C#, Repaso del tema 3 (tipos de datos básicos)

Preguntas incluidas: 10 (al azar) de 19

1

Un boolean "terminado" se puede usar de la forma

  • if (terminado) ...
  • if (terminado == true) ...
  • Son válidas tanto if (terminado) ... como if (terminado == true) ...

2

Para leer desde teclado un dato que contenga números entre -100 y 100, usarías

  • Convert.ToSbyte
  • Convert.ToSByte
  • Convert.ToByte
  • Convert.ToUByte
  • Convert.ToUbyte

3

Se puede leer un dato de tipo "Decimal" desde teclado con

  • Convert.ToDecimal
  • Convert.ToLongDouble
  • Convert.ToInt96
  • Convert.ToInt128

4

Un dato "double", permite datos de ¿cuántas cifras significativas?

  • 7
  • 3
  • 15
  • 31

5

Un dato "float", permite datos de ¿cuántas cifras significativas?

  • 7
  • 3
  • 15
  • 31

6

Se puede convertir un número n a hexadecimal con

  • n.Convert.ToString(16);
  • Convert.ToString(16,n);
  • Convert.ToString(n,16);
  • n.Convert.ToHex(16);
  • Convert.ToHex(n);

7

Un dato de tipo "int" ocupa

  • 1 byte
  • 2 bytes
  • 4 bytes
  • 8 bytes
  • 32 bytes

8

El tipo de datos "decimal" permite números con

  • 16 cifras
  • 22 cifras
  • 28 cifras

9

En C#, un dato boolean puede tener valores

  • T y F
  • .T. y .F.
  • true y false
  • True y False
  • "true" y "false"
  • 'true' y 'false'

10

Un dato "float" se lee desde otro dato (por ejemplo, desde un string recibido con ReadLine) con

  • Convert.ToFlt
  • Convert.ToFloat
  • Convert.ToSimple
  • Convert.ToSingle