kaldin

  • Login

C Programming


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;
}
  • A)

  • B)

  • C)

  • D)

Next
Show Answer:
Show Answer


More Question
Point out the error in the following program. #includestdio.h#includestdarg.hvoid varfun(int n, ...);int main() varfun(3, 7, -11.2, 0.66); return 0;void varfun(int n, ...) float ptr; int num; va_start(ptr, n); num = va_arg(ptr, int); printf(d, num);
Which of the following statements are correct about the function long fun(int num) int i; long f=1; for(i=1; i=num; i++) f = f i; return f;
What will be the output of the program #includestdio.hint main() int i=2; printf(d, d\n, ++i, ++i); return 0;
In the expression a=b=5 the order of Assignment is NOT decided by Associativity of operators.
Which of the following errors would be reported by the compiler on compiling the program given below #includestdio.hint main() int a = 5; switch(a) case 1: printf(First); case 2: printf(Second); case 3 + 2: printf(Third); case 5: printf(Final); break; return 0;