fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x,y,temp;
  5. printf("Enter x and y:");
  6. scanf("%d %d",&x,&y);
  7. printf("Before swapping:x=%d,y=%d",x,y);
  8. temp=x;
  9. x=y;
  10. y=temp;
  11. printf(After swapping:x=%d,y=%d",x,y);
  12. return 0;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:11:9: error: ‘After’ undeclared (first use in this function)
  printf(After swapping:x=%d,y=%d",x,y);
         ^~~~~
prog.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
prog.c:11:15: error: expected ‘)’ before ‘swapping’
  printf(After swapping:x=%d,y=%d",x,y);
               ^~~~~~~~
prog.c:11:33: warning: missing terminating " character
  printf(After swapping:x=%d,y=%d",x,y);
                                 ^
prog.c:11:33: error: missing terminating " character
  printf(After swapping:x=%d,y=%d",x,y);
                                 ^~~~~~~
prog.c:13:1: error: expected ‘;’ before ‘}’ token
 }
 ^
stdout
Standard output is empty