Q. What is the output?

Code:
int a = 5;
int *p = &a;
*p = 10;
printf("%d", a);
  • (A) 5
  • (B) 10
  • (C) 0
  • (D) Garbage
πŸ’¬ Discuss
βœ… Correct Answer: (B) 10
Explanation: Pointer dereferencing allows modifying the original variable.
Explanation by: Mr. Dubey
Pointer dereferencing allows modifying the original variable.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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