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

Preguntas incluidas: 10 (al azar) de 19

1

Un dato "int", permite enteros de ¿cuántas cifras?

  • 7
  • 9
  • 11
  • 13

2

Un boolean "terminado" se puede usar de la forma

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

3

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'

4

Para mostrar un número real "n" con exactamente dos decimales usarías

  • n.ToString(2);
  • n.ToString("0.00");
  • n.ToString("#.##");
  • n.ToString("00");
  • n.ToString("##");

5

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

  • 7
  • 3
  • 15
  • 31

6

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

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

7

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

8

Un dato de tipo "int" ocupa

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

9

Para escribir "Hola" entre comillas dobles en pantalla usarías

  • Console.Write(""Hola"");
  • Console.Write("\"Hola\"");
  • Console.Write("/"Hola/"");
  • Console.Write("Hola");
  • Console.Write('"Hola"');

10

Para leer desde teclado un dato que contenga números entre -50000 y +50000, optimizando el espacio ocupado, usarías

  • Convert.ToInt32
  • Convert.ToUInt32
  • Convert.ToUint32
  • Convert.ToInt16
  • Convert.ToUInt16
  • Convert.ToUint16