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
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;
If char=1, int=4, and float=4 bytes size, What will be the output of the program #includestdio.hint main() char ch = 'A'; printf(d, d, d, sizeof(ch), sizeof('A'), sizeof(3.14f)); return 0;
What will be the output of the program #includestdio.hint main() char str[] = Nagpur; str[0]='K'; printf(s, , str); str = Kanpur; printf(s, str+1); return 0;
How many times the while loop will get executed if a short int is 2 byte wide #includestdio.hint main() int j=1; while(j = 255) printf(c d\n, j, j); j++; return 0;
Which of the following statement is correct about the program #includestdio.hint main() FILE fp; char ch; int i=1; fp = fopen(myfile.c, r); while((ch=getc(fp))!=EOF) if(ch == '\n') i++; fclose(fp); return 0;