fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. char str[] = "Nagpur";
  6. str[0]='K';
  7. printf("%s, ", str);
  8. str = "Kanpur";
  9. printf("%s", str+1);
  10. return 0;
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:8:9: error: assignment to expression with array type
     str = "Kanpur";
         ^
stdout
Standard output is empty