Test details
The C ++ MCQ will allow you to test your general knowledge, from beginner to more advanced level!
Specifically, it highlights your level of proficiency in the following areas: coding concepts, such as command line arguments, pointers, and memory management. So we will see:
- Pointers (char pointers, pointer arithmetic)
- Memory allocations / deallocation
- Classes - constructors, object creation, deletion, initialization list
- Concepts OOPs - Inheritance / Polymorphism
Test author : Abha Agrawa
I have been programming in C ++ for 9 years now. I mobilize my expertise in the creation of software solutions for the financial industry. Working with WeLoveDevs on this questionnaire was an exciting opportunity mixing IT development and recruiting experience simultaneously!
Sample question
Consider a class MyType which defines a public function isType() as:
int isType (MyType& obj)
{
return (&obj == this) ? 1 : 0;
}
What is the output of the following? Object ‘obj’ of MyType is allocated statically and a pointer variable ‘objptr’ of type MyType is declared.
objptr = &obj;
if ( objptr->isType(obj) )
std::cout << "&obj and invoking object match!!!" << std::endl;
else
std::cout << "&obj and invoking object do not match!!!" << std::endl;
Developers ratings
Recommended tests
- Our interview questions for developer
- Our interview questions for Développeur Back-end