fork download
  1. #include <stdio.h>
  2. void main()
  3. {
  4. int a,b,c;
  5. printf("enter nos.")
  6. scanf("%d%d",&a,&b);
  7. printf("number before swap%d%d0",a,b);
  8. c=a;
  9. a=b;
  10. b=c;
  11. printf("nos. after swap%d%d",a,b);
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main()
      ^
prog.c: In function 'main':
prog.c:6:2: error: expected ';' before 'scanf'
  scanf("%d%d",&a,&b);
  ^
stdout
Standard output is empty