C++ is a popular programming language, which is used by major IT corporations in various areas. The quiz includes questions on the basics of C++ programming and will be useful both for beginners to check their knowledge and professionals to repeat basic subjects.
What will the a and x variables be after code exectuion?
8 and 7
8 and 2
6 and 2
When executing the next fragment of a program, the user entered: "10 234.5 8822". What will be displayed?
10 234.5 8822
What statement about cycles is right?
Only one counter can be in the for cycle
The while cycle can be not executed once
The for cycle cannot be infinite
What is a class constructor?
A method of instance initialization, which checks the opportunity of creating an instance and implements it
A method to create a class
A special class method, which is designed for initialization of class elements by several initial values
How many times will the (int i=0; i
How do you declare a variable?
Where will the processor search for the #include file?
In all folders of file inclusion
In local in relation to the project folders of file inclusion
In global in relation to the project folders of file inclusion
What will the x variable be?
The residue of diciding 400 by 3, which is multiplied by 2
Residue of division 400 by 6
The percentage of 400 divided by 6
What are preprocessing directives?
Program folder and file tree
A method of adding a library to a program
Instructions to the compiler to preprocess the information before actual compilation starts
How do you finish the string entry in case of input method cin>>line?
Enter spacebar or Enter
What will be displayed after code execution?
There will be the value of the expression 5+1*5+1=5+5+1=11
What access modifier doesn't exist?
What's a virtual function?
A member of the basic class, which can be predefined by a derived class
A function, the body of which is located on the remote server and is accessible only online
A function without body
What statement is right?
The size of a variable of bool type is less than the size of a variable of char type
A variable of float type occupies the same memory as double
The size of a variable of char type is 1
What is polymorphism?
The first definition is encapsulation, the second - inheritance.
A mechanism, which unites data and a code manipulating these data and protects them both from external interference or improper use
A process, using which one object can take on the properties of the other
A property, which allows using the same name to solve two or more similar but technically different problems
You don't know C++ at the level of Junior C++ developer
Probably, you've only started learning and didn't master the main subjects yet. The programmer's path is hard, but by means of training and self-development, you can achieve great results! Share the quiz with friends and check their level :)
You know the basics of C++, but not enough for the level of Junior C++ developer
You can write not difficult programs in С++, however, some simple problems can cause difficulties. Don't be upset! Remember your mistakes, read the theory related to them and solve several problems and then try to re-take the quiz - we're sure, you'll pull it off! Share the quiz with friends and check their level :)
Junior C++ developer
You mastered all the basics of C++ and can smoothly take on learning more complex subjects! Make sure to repeat the learned material to remember important subjects. Share the quiz with friends and check their level :)