C Programming Multiple Choice Questions (MCQ) | IT Developer <?php echo $page_title; ?>
IT Developer

C Programming Multiple Choice Questions (MCQ)

C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 17



Share with a Friend

Multiple Choice Questions


C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 17

81. What is alternate name of conditional operator?
A). Comparison operator
B). If-else Operator
C). Binary operator
D). Ternary operator
View Answer
Correct: D




82. Choose a correct C do while syntax.
A)
dowhile(condition)
{
    //statements
}
B)
do while(condition)
{
    //statements
}
C)
do
{
    //statements

}while(condition)
D)
do
{
    //statements

}while(condition);
View Answer
Correct: D




83. Choose a syntax for C Ternary Operator from the list.
A). condition ? expression1 : expression2
B). condition : expression1 ? expression2
C). condition ? expression1 < expression2
D). condition < expression1 ? expression2
View Answer
Correct: A




84. What is the output of C Program ?
int main()
{
    while(true)    
    {
        printf("RABBIT");
        break;
    }
    
    return 0;
}
A). RABBIT
B). RABBIT is printed unlimited number of times.
C). No output
D). Compiler error.
View Answer
Correct: D




85. The C code 'for( ; ; )' represents an infinite loop. It can be terminated by ___
A). break
B). exit(0)
C). abort()
D). terminate
View Answer
Correct: A