CPP For Loop MCQCPP MCQ
(1) Which of the following is first expression in C++ for loop ?
The first expression of C++ for loop statement is initialization. This is also optional part of for loop.
(2) Which of the following operator is used to separate expressions in C++ for loop statement?
A) Semicolon ;
B) Colon :
C) Comma ,
D) Ampersand &
All the expressions of C++ for loop are separated by semicolon.
(3) Which of the following is optional in C++ for loop statement?
D) All of these
In C++ are the expressions used in for loop statement are optional. We can skip any of them.