GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

C++ Quiz 1

Oscar Rojas 6 Fragen

Quiz starten

Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.

Fragen in diesem Quiz (6)

  1. 1Check all that are valid declarations:
    1. Along n = 100;
    2. Bint a = 25
    3. Cdouble {0.07};
    4. Dunsigned __int16 = -69;
    5. Eunsigned long double = 4.444;
  2. 2What will the following code return:
    #include <iostream>

    int main() {
    __int16 t = 1400;
    std::cout << t + sizeof(t);
    }
    1. A1402
    2. B1416
    3. C1432
  3. 3Which of the following may not be of type void?
    1. AObjects
    2. BArrays
    3. CFunctions
    4. DReferences
  4. 4The range of values that a 32 bit int can hold are from [+/- [blank_start]2,147,000,000[blank_end]]
    1. A32,768
    2. B1,200,000,000
    3. C2,147,000,000
    4. D9,000,000,000
  5. 5List the Floating Point types from least to greatest:
    [blank_start]float, long double, double[blank_end]
    1. Adouble, long double, float
    2. Blong double, double, float
    3. Cdouble, float, long double
    4. Dfloat, double, long double
  6. 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
    1. A#include <sstream>
    2. B0
    3. Cint num;
    4. D0
    5. Estd::getline(std::cin, n);
    6. Fstd::stringstream n

Informationen

Beschreibung
control io, namespaces & data types.
Sprache
English
Aufrufe
4
Schlagwörter
computer science
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck