C++ Loop Important MCQs
- Which Loop is Faster in C++?
- Size of a Turbo C/C++ Compiler is?
- ASCII Value of '\0' Character is?
- Which of the following is a formate String?
- Do While Loop is a also known as ______.
- What is the Ranged of Signed Char?
- What is the size of Following Struct(Turbo C++ 16 Bit Compiler)?
- Whic of the following is Logical AND Operator?
- Which of the following is a subscript operator?
- Which loop is guaranteed to execute at-least once?
- What will be the output of the following C++ code?
- the destination statement for the goto label is identified by what label?
- how are many sequences of statements present in c++?
- Decision Control statements in C++ can be implemented using?
- What will be the output of the following C++ code?
- what is correct syntax of for loop in c++?
- The if...else statement can be replaced by which operator?
- how many minimum number of functions should be present in a c++ program for its execution?
- What is the correct Syntax of do while loop?
- What will be the output of the following code?
- How are many sequences of statements present in c++?
- How many types of loops are there in C++?
- The break statement in repetition structure causes a program to
- Loop is used for ___________.
- How many tyes of loop are used in C++?
- Which of the following is NOT a loop?
- Which of the loop is also called counter loop?
- One execution of the loop is known as a/an?
- The loop which never ends is called ______.
- The for loop contains _________ expressions.
- A for loop contains three expression: initialization, condition, and _______.
- It is the simplest loop in c++ langauge?
- Which of the following loop is called entry controlled loop?
- Which of the following is pre tested loop in c++?
- Which of the following is post tested loop in c++?
- In which loop the condition comes before the body of the loop?
- In which loop the condition comes after the body of the loop.
- Semicolon is placed at the end of condition in ___________.
- A loop within a loop is called __________ loop.
- The statements within curly braces in a loop is known as _____________.
- Which of the following is NOT a loop.
- What is correct syntax of for loop?
- Which of the ends multiple Statements while loop?
- What is correct syntax of do while loop?
- What is correct syntax of while loop?
- for, while and do is the _______.
- Which is the correct ?
- If you want a user to enter exactly 50 values, which loop would be best to use?
- You can never use addresss of ______ variable ?
- The default Storage for local Variables is?
- How many times will "Hello, World" be printed in the below program?
(a) For
(b) While
(c) Do While
(d) All work at same speed
(d) All work at same speed
(a) 16 Bit
(b) 32 Bit
(c) 64 Bit
(d) None
(a) 16 Bit
(a) 0
(b) 48
(c) 32
(d) 65
(a) 0
(a) \n
(b) &
(c) %d
(d) none
(c) %d
(a) Entry Control
(b) Per Tested
(c) Exit Control
(d) All of Above
(c) Exit Control
(a) 0 to 255
(b) -128 to 127
(c) 127 to -128
(d) 0 to 127
(b) -128 to 127
Syntax :
Struct
{
int a;
char b;
float c;
}
(a) 2 Bytes
(b) 4 Bytes
(c) 10 Bytes
(d) 7 Bytes
(d) 7 Bytes
In Struct you can add all the bytes
(a) ||
(b) &
(c) &&
(d) !
(c) &&
(a) *
(b) {}
(c) []
(d) ()
(c) [] they used in Array
(a) for loop
(b) while loop
(c) do-while loop
(d) None
(c) do-while loop
#include <iostream>
using namespace std;
int main() {
int n ;
for (n = 5; n < 0; n--)
{
cout << n;
if (n == 3)
break;
}
return 0;
}
(a) 543
(b) 42
(c) 46
(d) 78
(a) 543
(a) $
(b) @
(c) *
(d) :
(d) : (Colon)
(a) 1
(b) 4
(c) 5
(d) 8
(c) 5
(a) if
(b) if-else
(c) Conditional Operator
(d) All of the above
(d) All of the above
#include <iostream>
using namespace std;
int main() {
if (0) {
cout << "Hello";
}
else
{
cout << "Good Bye";
}
return 0;
}
(a) Hello
(b) HelloGood by
(c) Good Bye
(d) Compilation Error
(c) Good Bye
(a)
for (statement 1; statement 2; statement 3) {
// code block to be executed
}
(b)
for (statement 1; statement 2; statement 3) {
// code block to be executed
}
(c)
for (statement 1, statement 2, statement 3) {
// code block to be executed
}
(d)
for (statement 1: statement 2: statement 3) {
// code block to be executed
}
(a)
(a) Addition operator
(b) Multiplicative operator
(c) Conditional operator
(d) Bitwise operator
(c) Conditional operator
(a) 0
(b) 1
(c) 2
(d) 3
(b) 1
(a)
do {
// code block to be executed
}
while (condition);
(b)
do(condition) {
// code block to be executed
}
while;
(c)
while {
// code block to be executed
}
do (condition);
(d)
do {
// code block to be executed
while (condition)
};
(a)
#include <iostream>
using namespace std;
int main() {
for (int i = 1; i <= 5; ++i) {
cout << i << " ";
}
return 0;
}
(a) 1 3 4 5
(b) 1 2 3 4 5
(c) 5 4 3 2 1
(d) 4 5 1 2 3
(b) 1 2 3 4 5
(a) 1
(b) 2
(c) 4
(d) 5
(d) 5
(a) 1
(b) 2
(c) 3
(d) 4
(c) 3 (while loop,for loop, do while loop)
(a) Again start the loop from 1
(b) All of them
(c) Terminate
(d) Immediately exit
(d) Immediately exit
(a) Selection
(b) Decision
(c) Repetition
(d) None of these
(c) Repetition
(a) Two
(b) Three
(c) Five
(d) Seven
(b) Three
(a) for
(b) while
(c) do while
(d) while do
(d) while do
(a) for
(b) do while
(c) while
(d) All of these
(a) for
(a) Test
(b) Iteration
(c) Repeated
(d) All of these
(b) Iteration
(a) Counter Loop
(b) Infinite Loop
(c) Nested Loop
(d) None of these
(b) Infinite Loop
(a) 3
(b) 4
(c) 7
(d) 9
(a) 3
(a) Increment
(b) Decrement
(c) Increment/Decrement
(d) Validat
(c) Increment/Decrement
(a) for loop
(b) while loop
(c) do while
(d) Nested Loop
(a) for loop
(a) for loop
(b) while loop
(c) do while
(d) None
(b) while loop
(a) for loop
(b) while loop
(c) do while
(d) Nested Loop
(b) while loop
(a) for loop
(b) while loop
(c) do while loop
(d) None of these
(c) do while loop
(a) for loop
(b) while loop
(c) do while loop
(d) Nested Loop
(b) while loop
(a) for loop
(b) while loop
(c) do while loop
(d) Nested Loop
(c) do while loop
(a) for loop
(b) while loop
(c) do while loop
(d) Nested Loop
(c) do while loop
(a) for loop
(b) while loop
(c) do while loop
(d) Nested Loop
(c) do while loop
(a) Statement
(b) Part
(c) Body
(d) All of these
(c) Body
(a) for loop
(b) while loop
(c) do while loop
(d) for if loop
(d) for if 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);
(c) for(initialization; condition;increment/decrement)
(a) Semicolon (;)
(b) Right Brace
(c) Right Bracket
(d) All of these
(b) Right Brace
(a) do{ body of loop} while(condition)
(b) do{ body of loop} while(condition);
(c) do{ body of loop} while(condition):
(d) while{ body of loop } do(condition);
(b) do{ body of loop} while(condition);
(a) while (condition) [ body of loop ]
(b) while { body of loop }
(c) while (condition) { body of loop }
(d) while (condition); { body of loop }
(c) while (condition) { body of loop }
(a) Variable
(b) Data Type
(c) Keywords
(d) All of these
(c) Keywords
(a) for(int i = 0: i<=10: i++)
(b) for(int i = 0; i<=10; i++)
(c) for(int i = 0; i<=10; i++);
(d) for(int i = 0, i<=10; i++)
(b) for(int i = 0; i<=10; i++)
(a) for Loop
(b) while Loop
(c) do while Loop
(d) All of these
(a) for Loop
(a) Global
(b) Static
(c) Auto
(d) Register
(d) Register
(a) Extren
(b) Static
(c) Auto
(d) Register
(c) Auto
#include <stdio.h>
int main(){
int i = 1024;
for(; i; i >>=1){
printf("Hello, World");
return 0;
}
}
(a) 10
(b) 11
(c) Infinite
(d) Compile time Error
(b) 11
Cover Topics
"c++ loop questions and answers","loops in c++ pdf","C++ Loop Important MCQs","solved mcqs of c++ with answers","c++ loop quiz","for loop questions and answers","C++ Mcqs","Interview Questions on Loops in C++","cpp mcqs","multiple choice questions on loops in c++","if else statement in c++ quiz","nested loop mcqs".
Post a Comment
To be published, comments must be reviewed by the administrator.