fork download
  1. #include <stdio.h>
  2.  
  3. void func(int *p){
  4. int x = 3;
  5. *p = x;
  6. }
  7.  
  8. int main(){
  9. int y = 0;
  10. func(&y);
  11. printf("\n Value = %d",y);
  12. return 0;
  13. }
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
 Value = 3