Test
Тест 15
Crea una cuenta gratis para terminar este test
Guarda tu progreso y consulta tu resultado final.
¿Ya tienes cuenta? Inicia sesión
Preguntas del test (10)
1What will be printed on the standard output after the execution of the following program code:

- A777
- B77
- C7777
- D7
2What will be printed on the standard output after the execution of the following program code:

- A1 2 1 2 3
- B1 3 1 2 3
- C2 2 1 2 3
- D2 3 1 2 3
3Given the class:

- Ac=7.4 - b;
- Bc=12.7 + a;
- Cc=a + 5.3;
- Dc=b - 8.6;
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?- Aprom_pok.i=7;
- Bprom_pok->i=7;
- CoopStr->i=7;
- Dprom->i=7;
5Given the program code:
class Eng{
int a;
};
Eng e1, *e2=&e1;
How do we access the attribute from e2?- Ae2::a
- Be2.a
- Ce2->a
- Dit cannot be accessed
6Given the class:
class Test{
private: char* s;
public: //...
};
Which of the following would be a valid copy constructor for class Test:- ATest(const Test& t) { s = new char[ strlen(t.s) + 1]; strcpy(s, t.s); }
- BTest(const Test t) { s = new char[ strlen(t.s) + 1]; strcpy(s, t.s); }
- CTest(const char* t) { s = new char[ strlen(t) + 1]; strcpy(s, t); }
- DTest() { s = new char[ 100 ]; }
7In how many different ways the function can be called:
int Volume (int x, int y=0, int z=3) {return x*y*z; }- A4
- B1
- C3
- D2
8What will be the output of the execution of the following program code:

- ADC-G2 DC-Student DC-Student DC-G2 DC-Student DC-Student DC-G2 DC-Student DC-Student
- BDC-Student DC-Student DC-G2
- CDC-G2 DC-G2 DC-G2
- DDC-Student DC-Student DC-G2 DC-Student DC-Student DC-G2 DC-Student DC-Student DC-G2
9What will be the output of the execution of the following program code:

- A0 7 8 7 8 9
- B0 2 0 7 0 0
- C0 2 3 7 8 9
- Derror the enum isn't defined right
10What is the correct way for dynamic memory allocation for an array of 35 integer numbers?
- Aint a[35];
- Bint a= new int[35];
- Cint *a = new int[35];
- Dint a[]=new int(35);
Información
- Descripción
- OOP Test sobre Тест 15, creado por Code Purpose el 02/05/2020.
- Autor
- Code Purpose
- Idioma
- English
- Visitas
- 178
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test