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

Quiz

GAME1001 Object Oriented Programming

Liam Blake 15 Fragen

Quiz starten

Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.

Fragen in diesem Quiz (15)

  1. 1A default constructor is one that takes _____ arguments. It is automatically called when an object is _________.
    1. Ano, destroyed
    2. Bno, created
    3. Cone, destroyed
    4. Done, created
    5. Eas many as you want, destroyed
  2. 2What is an abstract data type?
    1. AAre programmer created data types
    2. BAre Function created data types
    3. CStands for ADR
    4. DAllows a programmer to design a solution
    5. ENone of the above
  3. 3What will the following statement print out?
    int score[ ] = { 14, 55, 44 };
    cout << *score;
    1. AThis will not work
    2. B14
    3. C55
    4. D44
    5. ENone of the above
  4. 4What is a C-String terminated by? (MORE THAN ONE CAN BE CORRECT)
    1. AA NULL character
    2. BTerminated by \0
    3. Ca sequence of numbers
    4. DTerminated by NULL
    5. ENone of the above
  5. 5Select an example of a constructor for class LOTile:
    1. ALOTile()
    2. BLOTile() { }
    3. C~LOTile() { }
    4. DLOTile { }
    5. ELOTile LOTile();
  6. 6What will this statement print?
    int num = 5;
    int* numptr;
    numptr = &num;
    cout << numptr << endl;
    1. AThe address of num variable
    2. BThe address of numptr uninitialized
    3. C5
    4. DThis program will not work
    5. ENone of the above
  7. 7How can we change this program so that the statement changes the original variable num in main?
    void setNum(int num)
    { num = 5; }
    int main() {
    int num;
    }
    1. Avoid setNum(int &num)
    2. Bvoid setNum(int num);
    3. Cthis->num = num;
    4. Dnum = 8;
    5. ENone of the above
  8. 8What will this print out?
    int num = 2;
    int score[] = { 66, 64, 100, 90 };
    cout << *(score + num);
    1. A100
    2. B66
    3. C64
    4. D90
    5. EThis program will not work
  9. 9What will this for loop print? (int score[4] = { 30, 34, 11, 90 };
    for (int i = 0; i < 4; i++)
    if (i % 3 == 0)
    else
    cout << *(score + i) << " ";
    1. A30 34 11 90
    2. B30 34 11
    3. C34 11 90
    4. D30 34 90
    5. EThis program will not work
  10. 10What does "\b" do?
    1. Amoves the cursor back one space
    2. Bmoves the cursor forward one space
    3. Cstarts a new line
    4. DThis is not a real function statement
    5. ENone of the above

Informationen

Beschreibung
Intro to Programming - GAME1001 Quiz am GAME1001 Object Oriented Programming, erstellt von Liam Blake am 27/03/2019.
Sprache
English
Aufrufe
1
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck