C-Control Instructions Question and Answer

C-Control Instructions Question and Answer
1. How many times the while loop will get executed if a short int is 2 byte wide?

#include<stdio.h>
int main()
{
    int j=1;
    while(j <= 255)
    {
        printf("%c %d\n", j, j);
        j++;
    }
    return 0;
}

  • Infinite times
  • 255 times
  • 256 times
  • 254 times
Show Answer
2. Which of the following is not logical operator?
  • &
  • &&
  • ||
  • !
Show Answer
3. In mathematics and computer programming, which is the correct order of mathematical operators ?
  • Addition, Subtraction, Multiplication, Division
  • Division, Multiplication, Addition, Subtraction
  • Multiplication, Addition, Division, Subtraction
  • Addition, Division, Modulus, Subtraction
Show Answer
4. Which of the following cannot be checked in a switch-case statement?
  • Character
  • Integer
  • Float
  • enum
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test