(A) Semicolon not written
(B) Divide by zero
(C) Variable not declared
(D) An expression is wrongly written
Category: C++ Programming Mcqs
C++ Programming Mcqs for Screening tests, Interviews, Viva and Other competitive exams. C++ Programming Mcqs section will help users to prepare mcqs of C++ Programming for various exams. Aspirants of Lecturer Computer Science, SST Computer Science, Subject Specialist Computer Science, Data Entry operator, Computer Programmer, Computer Operator, Software engineer and all other Competitive Exams can prepare their C++ programming portion from here.
What is an exception in C++ program?
(A) A problem that arises during compilation
(B) Also known as semantic error
(C) Also known as syntax error
(D) A problem that arises during the execution of a program
Which is correct among following?
(A) for(int a=0; a<=10; a++)
(B) for(int a=0: a<=10: a++)
(C) for(int a=0; a<=10; a++);
(D) All are correct[showhide type="post" more_text="►Correct Option" less_text="Show less..."]
Correct Answer is: A
[/showhide]
For, while and do is the?
(A) Keywords
(B) Data type
(C) Variable
(D) All of the above
Correct syntax of while loop is?
(A) while (condition) [body of loop]
(B) while {body of loop}
(C) while (condition) {body of loop}
(D) while (condition); {body of loop}
What is the correct syntax of do while loop?
(A) while {body of loop} do (condition);
(B) do {body of loop} while (condition)
(C) do {body of loop} while (condition);
(D) None of the above
Identify correct sentence of for loop?
(A) for(initialization:condition:increment/decrement);
(B) for(initialization:condition:increment/decrement)
(C) for(initialization;condition;increment/decrement)
(D) for(initialization;condition;increment/decrement);
Which among following is not a loop?
(A) while loop
(B) do while loop
(C) for loop
(D) for it loop