...
Computer-Networks
February 8, 2024
NTA UGC NET Dec 2023 Paper-2
February 8, 2024
Computer-Networks
February 8, 2024
NTA UGC NET Dec 2023 Paper-2
February 8, 2024

NTA UGC NET Dec 2023 Paper-2

Question 21
What is the output of the following program?
#include
# define SQR(x) (x*x)
int main () {
int a, b=3;
a = SQR(b+2);
printf(“%d”,a);
return 0;
}
A
25
B
11
C
Garbage value
D
24
Question 21 Explanation: 
1) 3 + 2 * 3 + 2
2) Perform multiplication: 3 + (2 * 3) + 2
3) Perform multiplication: 3 + 6 + 2
4) Perform addition: 11
Correct Answer: B
Question 21 Explanation: 
1) 3 + 2 * 3 + 2
2) Perform multiplication: 3 + (2 * 3) + 2
3) Perform multiplication: 3 + 6 + 2
4) Perform addition: 11
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!