Q. Choose a correct C Statement.

  • (A) a++ is (a=a+1) POST INCREMENT Operator
  • (B) a-- is (a=a-1) POST DECREMENT Opeartor --a is (a=a-1) PRE DECREMENT Opeator
  • (C) ++a is (a=a+1) PRE INCRMENT Operator
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Choose correct Syntax for C Arithmetic Compound Assignment Operators.

  • (A) a+=b is (a= a+ b). a-=b is (a= a-b)
  • (B) a*=b is (a=a*b). a/=b is (a = a/b)
  • (C) a%=b is (a=a%b)
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. What is the output of C Program?

Code:
int main()
{
    int k, j;
    
    for(k=1, j=10; k <= 5; k++)
    {
        printf("%d ", (k+j));
    }

    return 0;
}
  • (A) compiler error
  • (B) 10 10 10 10 10
  • (C) 11 12 13 14 15
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) 11 12 13 14 15

Q. What is the output of C Program?

Code:
int main()
{
    int k;
    
    for(k=1; k <= 5; k++);
    {
        printf("%d ", k);
    }

    return 0;
}
  • (A) 1 2 3 4 5
  • (B) 1 2 3 4
  • (C) 6
  • (D) 5
πŸ’¬ Discuss
βœ… Correct Answer: (C) 6

Q. What is the output of C Program?

Code:
int main()
{
    int k;
    
    for(;;)
    {
        printf("TESTING\n");
        break;
    }

    return 0;
}
  • (A) No Output
  • (B) TESTING
  • (C) Compiler error
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) TESTING

Q. What is the output of C Program?

Code:
int main()
{
    int k;
    
    for(printf("FLOWER "); printf("YELLOW "); printf("FRUITS "))
    {
        break;
    }

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

Q. What is the way to suddenly come out of or Quit any Loop in C Language?

  • (A) continue; statement
  • (B) break; statement
  • (C) leave; statement
  • (D) quit; statement
πŸ’¬ Discuss
βœ… Correct Answer: (B) break; statement

Q. Choose facts about continue; statement is C Language.

  • (A) continue; is used to take the execution control to next iteration or sequence
  • (B) continue; statement causes the statements below it to skip for execution
  • (C) continue; is usually accompanied by IF statement.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. What is the output of C Program?

Code:
int main()
{
    int a=14;
    
    while(a<20)
    {
        ++a;
        if(a>=16 && a<=18)
        {
            continue;
        }
        printf("%d ", a);
       
    }

    return 0;
}
  • (A) 15 16 17 18 19
  • (B) 15 18 19
  • (C) 15 16 20
  • (D) 15 19 20
πŸ’¬ Discuss
βœ… Correct Answer: (D) 15 19 20

Q. Choose a correct statement about C break; statement.

  • (A) break; statement can be used inside switch block
  • (B) break; statement can be used with loops like for, while and do while.
  • (C) break; statement causes only the same or inner loop where break; is present to quit suddenly.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above