Quiz
C++ Quiz 1
Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.
Fragen in diesem Quiz (6)
1Check all that are valid declarations:
- Along n = 100;
- Bint a = 25
- Cdouble {0.07};
- Dunsigned __int16 = -69;
- Eunsigned long double = 4.444;
2What will the following code return:
#include <iostream>
int main() {
__int16 t = 1400;
std::cout << t + sizeof(t);
}- A1402
- B1416
- C1432
3Which of the following may not be of type void?
- AObjects
- BArrays
- CFunctions
- DReferences
4The range of values that a 32 bit int can hold are from [+/- [blank_start]2,147,000,000[blank_end]]
- A32,768
- B1,200,000,000
- C2,147,000,000
- D9,000,000,000
5List the Floating Point types from least to greatest:
[blank_start]float, long double, double[blank_end]- Adouble, long double, float
- Blong double, double, float
- Cdouble, float, long double
- Dfloat, double, long double
6Debug the following code:
#include <iostream>
#include <string> // Allows use of strings
// [blank_start]missing namespaces[blank_end]
int main() {
std::string n; // [blank_start]Debug[blank_end]
int num // [blank_start]Debug[blank_end]
std::cout<<"Enter a #"<< std::endl; // [blank_start]Debug[blank_end]
std::getline(cin, n); // [blank_start]Debug[blank_end]
[blank_start]function[blank_end] >> num;
}
For lines w/o mistakes return 0- A#include <sstream>
- B0
- Cint num;
- D0
- Estd::getline(std::cin, n);
- Fstd::stringstream n
Informationen
- Beschreibung
- control io, namespaces & data types.
- Autor
- Oscar Rojas
- Sprache
- English
- Aufrufe
- 4
- Schlagwörter
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz