Q. What will be the output of this program?

Code:
#include <stdio.h>
int main() {
    int a = 10;
    int *p = &a;
    printf("%d", *p);
    return 0;
}
  • (A) 10
  • (B) Address of a
  • (C) Garbage value
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 10
Explanation: *p gives the value of a, which is 10.
Explanation by: Mr. Dubey
*p gives the value of a, which is 10.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
69
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate