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 8



Share with a Friend

Multiple Choice Questions


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

36. What is the output of the C Program ?
int main()
{
    if(10.0)
    {
        printf("Chicago\n");
    }
    printf("Ping");

    return 0;
}
A). Ping
B). Chicago Ping
C). Compiler error.
D). None of the above.
View Answer
Correct: B




37. What is the output?
void main()
{
   int a=5; 
   while(a==5) 
     {
        printf("Hello");
        break;
      }
 }
A). Hello
B). Hello is printed infinite times
C). Blank
D). Error
View Answer
Correct: A




38. What is the output of C Program ?
int main()
{
    if("abc")
    {
        printf("India\n");
    }
    if(\'c\')
    {
        printf("Bharat\n");
    }
    printf("Ping");

    return 0;
}
A). Ping
B). Bharat Ping
C). India Ping
D). India Bharat Ping
View Answer
Correct: D




39. What is the output?
void main()
{
  int a=5;
  while(a >= 3);
   {
      printf("Hello ");
   }
}
A). Hello
B). Hello is printed infinite times
C). Blank
D). Error
View Answer
Correct: C




40. What is the output of C Program ?
int main()
{
    if(TRUE)
    {
        printf("India\n");
    }
    if(true)
    {
        printf("Bharat\n");
    }
    printf("Ping");

    return 0;
}
A). India Ping
B). Bharat Ping
C). India Bharat Ping
D). Compiler error
View Answer
Correct: D