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;
}
#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
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
4. Which of the following cannot be checked in a switch-case statement?
- Character
- Integer
- Float
- enum