kaldin

  • Login

C Programming


1) What will be the output of the program?

#include<stdio.h>

int main()
{
    char c=48;
    int i, mask=01;
    for(i=1; i<=5; i++)
    {
        printf("%c", c|mask);
        mask = mask<<1;
    }
    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 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;
va_list is an array that holds information needed by va_arg and va_end.
Will the program compile in Turbo C #includestdio.hint main() int a=10, j; void k; j=k=&a; j++; k++; printf(u u\n, j, k); return 0;
A preprocessor directive is a message from programmer to the preprocessor.