B Bích Hạnh Member Sep 21, 2021 #1 What will be the output of the following C code? Code: #include <stdio.h> void foo(int*); int main() { int i = 10, *p = &i; foo(p++); } void foo(int *p) { printf("%d\n", *p); } A. 10 B. Some garbage value C. Compile time error D. Segmentation fault
What will be the output of the following C code? Code: #include <stdio.h> void foo(int*); int main() { int i = 10, *p = &i; foo(p++); } void foo(int *p) { printf("%d\n", *p); } A. 10 B. Some garbage value C. Compile time error D. Segmentation fault