Oscar Rojas
Quiz por , criado more than 1 year ago

control io, namespaces & data types.

1
0
0
Oscar Rojas
Criado por Oscar Rojas mais de 4 anos atrás
Fechar

C++ Quiz 1

Questão 1 de 6

1

Check all that are valid declarations:

Selecione uma ou mais das seguintes:

  • long n = 100;

  • int a = 25

  • double {0.07};

  • unsigned __int16 = -69;

  • unsigned long double = 4.444;

Explicação

Questão 2 de 6

1

What will the following code return:
#include <iostream>

int main() {
__int16 t = 1400;
std::cout << t + sizeof(t);
}

Selecione uma das seguintes:

  • 1402

  • 1416

  • 1432

Explicação

Questão 3 de 6

1

Which of the following may not be of type void?

Selecione uma ou mais das seguintes:

  • Objects

  • Arrays

  • Functions

  • References

Explicação

Questão 4 de 6

1

Selecione da lista do Menu para completar o texto.

The range of values that a 32 bit int can hold are from [+/- ( 32,768, 1,200,000,000, 2,147,000,000, 9,000,000,000 )]

Explicação

Questão 5 de 6

1

List the Floating Point types from least to greatest:

Arraste e solte para completar o texto.

    double, long double, float
    long double, double, float
    double, float, long double
    float, double, long double

Explicação

Questão 6 de 6

1

Preencha os espaços em branco para completar o texto.

Debug the following code:

#include <iostream>
#include <string> // Allows use of strings
//
int main() {
std::string n; //
int num //
std::cout<<"Enter a #"<< std::endl; //
std::getline(cin, n); //
>> num;
}
For lines w/o mistakes return 0

Explicação