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

Quiz

Тест 15

Code Purpose 10 Fragen

Quiz starten

Fragen in diesem Quiz (10)

  1. 1What will be printed on the standard output after the execution of the following program code:Bild zu Frage 1
    1. A777
    2. B77
    3. C7777
    4. D7
  2. 2What will be printed on the standard output after the execution of the following program code:Bild zu Frage 2
    1. A1 2 1 2 3
    2. B1 3 1 2 3
    3. C2 2 1 2 3
    4. D2 3 1 2 3
  3. 3Given the class:Bild zu Frage 3
    1. Ac=7.4 - b;
    2. Bc=12.7 + a;
    3. Cc=a + 5.3;
    4. Dc=b - 8.6;
  4. 4Given the program code:
    typedef struct oopStruktura { int i; }oopStr;
    typedef oopStr *pok; oopStr prom; pok prom_pok =&prom;
    Which of the following expression is valid?
    1. Aprom_pok.i=7;
    2. Bprom_pok->i=7;
    3. CoopStr->i=7;
    4. Dprom->i=7;
  5. 5Given the program code:
    class Eng{
    int a;
    };
    Eng e1, *e2=&e1;
    How do we access the attribute from e2?
    1. Ae2::a
    2. Be2.a
    3. Ce2->a
    4. Dit cannot be accessed
  6. 6Given the class:
    class Test{
    private: char* s;
    public: //...
    };
    Which of the following would be a valid copy constructor for class Test:
    1. ATest(const Test& t) { s = new char[ strlen(t.s) + 1]; strcpy(s, t.s); }
    2. BTest(const Test t) { s = new char[ strlen(t.s) + 1]; strcpy(s, t.s); }
    3. CTest(const char* t) { s = new char[ strlen(t) + 1]; strcpy(s, t); }
    4. DTest() { s = new char[ 100 ]; }
  7. 7In how many different ways the function can be called:
    int Volume (int x, int y=0, int z=3) {return x*y*z; }
    1. A4
    2. B1
    3. C3
    4. D2
  8. 8What will be the output of the execution of the following program code:Bild zu Frage 8
    1. ADC-G2 DC-Student DC-Student DC-G2 DC-Student DC-Student DC-G2 DC-Student DC-Student
    2. BDC-Student DC-Student DC-G2
    3. CDC-G2 DC-G2 DC-G2
    4. DDC-Student DC-Student DC-G2 DC-Student DC-Student DC-G2 DC-Student DC-Student DC-G2
  9. 9What will be the output of the execution of the following program code:Bild zu Frage 9
    1. A0 7 8 7 8 9
    2. B0 2 0 7 0 0
    3. C0 2 3 7 8 9
    4. Derror the enum isn't defined right
  10. 10What is the correct way for dynamic memory allocation for an array of 35 integer numbers?
    1. Aint a[35];
    2. Bint a= new int[35];
    3. Cint *a = new int[35];
    4. Dint a[]=new int(35);

Informationen

Beschreibung
OOP Quiz am Тест 15, erstellt von Code Purpose am 02/05/2020.
Sprache
English
Aufrufe
178
Schlagwörter
oop
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck