What is the output of the following program? #include <stdio.h> void f00 (int…

2021

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; }

Answer: B. 200Answer: 200 — the program prints 200. In main(), variable a is initialized to 100.

  1. A.

    100

  2. B.

    200

  3. C.

    Compile time error

  4. D.

    Runtime error

Attempted by 833 students.

Show answer & explanation

Correct answer: B

Answer: 200 — the program prints 200. In main(), variable a is initialized to 100.

Explore the full course: Up Lt Grade Assistant Teacher 2025

Loading lesson…