Q. What will be the value of x in the following code snippet?

Code:
#include <stdio.h>
void solve() {
    int x = printf("Hello");
    printf(" %d", x);
}
int main() {
	solve();
	return 0;
}
  • (A) 10
  • (B) 5
  • (C) 1
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (B) 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
269
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Manisha Agrawal
Publisher
πŸ“ˆ
88%
Success Rate