fork download
  1. #include <stdio.h>
  2.  
  3. void func1(int mc[])
  4. {
  5. mc[1]=25;
  6. *(mc+3)=45;
  7. }
  8.  
  9. void func2(int *nd)
  10. {
  11. *(nd+2)=35;
  12. nd[4]=55;
  13. }
  14.  
  15. int main(void)
  16. {
  17. int i;
  18. int vc[5]=(10,20,30,40,50);
  19.  
  20. func1(vc);
  21. func2(vc);
  22.  
  23. for (i=0;i<5;i++)
  24. printf("vc[%d]=%d\n",i,vc[i]);
  25.  
  26. return(0);
  27. }
  28.  
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:18: warning: left-hand operand of comma expression has no effect
prog.c:18: warning: left-hand operand of comma expression has no effect
prog.c:18: warning: left-hand operand of comma expression has no effect
prog.c:18: warning: left-hand operand of comma expression has no effect
prog.c:18: error: invalid initializer
stdout
Standard output is empty