kaldin

  • Login

C Programming


1) What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str[] = "Nagpur";
    str[0]='K';
    printf("%s, ", str);
    str = "Kanpur";
    printf("%s", str+1);
    return 0;
}
  • A)

  • B)

  • C)

  • D)

Next
Show Answer:
Show Answer


More Question
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;
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;
The first argument to be supplied at command-line must always be count of total arguments.
What will be the output of the program #includestdio.hint main() int i=4, j=8; printf(d, d, d\n, ij&ji, ij&ji, i^j); return 0;
What will be the output of the program #includestdio.hint main() char p; p=hello; printf(s\n, &&p); return 0;