Q. What is the output?

Code:
int a = 10;
int *p = &a;
printf("%d", *p);
  • (A) Address of a
  • (B) 10
  • (C) Garbage
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 10
Explanation: *p dereferences the pointer to get value of a.
Explanation by: Mr. Dubey
*p dereferences the pointer to get value of a.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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