Q. What is the output of C Program.?

Code:
int main()
{
    int a=5, b=8;
    
    if( a==5 && (b=9) )
    {
        printf("Gorilla Glass=");
    }
    printf("%d %d", a, b);

    return 0;
}
  • (A) 5 8
  • (B) 5 9
  • (C) Gorilla Glass=5 8
  • (D) Gorilla Glass=5 9
πŸ’¬ Discuss
βœ… Correct Answer: (D) Gorilla Glass=5 9

Q. What is the output of C Program.?

Code:
int main()
{
    int a=5, b=8;
    
    if( a==5 || (b=9) )
    {
        printf("Gorilla Glass=");
    }
    printf("%d %d", a, b);

    return 0;
}
  • (A) 5 8
  • (B) 5 9
  • (C) Gorilla Glass=5 8
  • (D) Gorilla Glass=5 9
πŸ’¬ Discuss
βœ… Correct Answer: (C) Gorilla Glass=5 8

Q. Choose a right C Statement.

  • (A) Loops or Repetition block executes a group of statements repeatedly.
  • (B) Loop is usually executed as long as a condition is met.
  • (C) Loops usually take advantage of Loop Counter
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Loops in C Language are implemented using.?

  • (A) While Block
  • (B) For Block
  • (C) Do While Block
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Which loop is faster in C Language, for, while or Do While.?

  • (A) for
  • (B) while
  • (C) do while
  • (D) All work at same speed
πŸ’¬ Discuss
βœ… Correct Answer: (D) All work at same speed

Q. What is the output of C Program.?

Code:
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.
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compiler error.

Q. What is the output of C Program.?

Code:
int main()
{
    int a=5;
    
    while(a==5)    
    {
        printf("RABBIT");
        break;
    }

    return 0;
}
  • (A) RABBIT is printed unlimited number of times
  • (B) RABBIT
  • (C) Compiler error
  • (D) None of the above.
πŸ’¬ Discuss
βœ… Correct Answer: (B) RABBIT

Q. What is the output of C Program.?

Code:
int main()
{
    int a=25;
    
    while(a <= 27)
    {
        printf("%d ", a);
        a++;
    }

    return 0;
}
  • (A) 25 25 25
  • (B) 25 26 27
  • (C) 27 27 27
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 25 26 27

Q. What is the output of C Program?

Code:
int main()
{
    int a=32;
    
    do
    {
        printf("%d ", a);
        a++;
    }while(a <= 30);

    return 0;
}
  • (A) 32
  • (B) 33
  • (C) 30
  • (D) No Output
πŸ’¬ Discuss
βœ… Correct Answer: (A) 32

Q. What is the output of C Program?

Code:
int main()
{
    int a=32;
    
    do
    {
        printf("%d ", a);
        a++;
        if(a > 35)
            break;
    }while(1);

    return 0;
}
  • (A) No Output
  • (B) 32 33 34
  • (C) 32 33 34 35
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 32 33 34 35