fork download
  1. #include <stdio.h>
  2.  
  3. void foo(int p[static 1]);
  4.  
  5. int main(void)
  6. {
  7. int n = 42;
  8. int *p = NULL;
  9.  
  10. foo(&n);
  11. foo(p);
  12. foo(NULL);
  13.  
  14. return 0;
  15. }
  16.  
  17. void foo(int p[static 1])
  18. {
  19. if (!p) {
  20. printf("Error: null pointer passed\n");
  21. }
  22. }
  23.  
Success #stdin #stdout 0s 9296KB
stdin
Standard input is empty
stdout
Standard output is empty