What is the output of the following program? #include <stdio.h> void f00 (int…
2022
What is the output of the following program? #include <stdio.h> void f00 (int *P) { *P = 200; } int main() { int a = 100; f00(&a); printf("%d", a); return 0; }
- A.
100
- B.
200
- C.
Compile time error
- D.
Runtime error
Attempted by 595 students.
Show answer & explanation
Correct answer: B
Answer: 200 — the program prints 200. In main(), variable a is initialized to 100.