C++ is a programming language that is widely used in developing a lot of applications such as gaming engines because of how fast it is. Are you about to sit for exams about the basics behind this language? The quiz below is exactly what you need to ensure you get the best marks. Do take up others like it.
Questions and Answers
1.
What is the correct value to return to the operating system upon the successful completion of a program?
A. 
-1
B. 
1
C. 
0
D. 
Programs do not return a value.
2.
What is the only function all C++ programs must contain?
A. 
Start()
B. 
System()
C. 
Main()
D. 
Program()
3.
What punctuation is used to signal the beginning and end of code blocks?
A. 
{}
B. 
->and
C. 
BEGIN and END
D. 
( and )
4.
What punctuation ends most lines of C++ code?
A. 
.
B. 
;
C. 
:
D. 
'
5.
Which of the following is a correct comment?
A. 
*/ Comments */
B. 
** Comment **
C. 
/* Comment */
D. 
{ Comment }
6.
Which of the following is not a correct variable type?
A. 
Float
B. 
Real
C. 
Int
D. 
Double
7.
Which of the following is the correct operator to compare two variables?
Below is what is considered the hardest trivia quiz on C++ programming language. It is designed for those of us who are studying towards passing the certification exam. Gaming developers mostly prefer the C++ language since it is...
Questions: 90 | Attempts: 1545 | Last updated: Mar 21, 2022
Sample Question
What is the output of the following function and function call?
void calculateCost(int count, float& subTotal, float taxCost);
float tax = 0.0,
subtotal = 0.0;
calculateCost(15, subtotal,tax);
cout << "The cost for 15 items is " << subtotal
<< ", and the tax for " << subtotal << " is " << tax << endl;
//end of fragment
void calculateCost(int count, float& subTotal, float taxCost)
{
if ( count < 10)
{
subTotal = count * 0.50;
}
else
{
subTotal = count * 0.20;
}
taxCost = 0.1 * subTotal;
}
Below is a C++ programming advanced level test that is perfect for testing out just how ready you are to tackle the upcoming certification exam and your capability to deliver the best service to your clients. Give it a try and...
Questions: 57 | Attempts: 891 | Last updated: Mar 22, 2022
Sample Question
The base class's access specification affects the way base class member functions
may access base class member variables.