Question 8806 – Programming
April 14, 2024Question 8853 – Programming
April 14, 2024C-Programming
Question 3
|
Consider the following C program
int a, b, c = 0; void prtFun (void); int main () { static int a = 1; /* line 1 */ prtFun(); a += 1; prtFun(); printf ( "n %d %d " , a, b) ; } void prtFun (void) { static int a = 2; /* line 2 */ int b = 1; a += ++b; printf (" n %d %d " , a, b); }
What output will be generated by the given code segment?
![]() |
|
![]() |
|
![]() |
|
![]() |
Question 3 Explanation:
![](https://solutionsadda.in/wp-content/uploads/2020/01/h6-1.jpg)
Hence
4 2
6 2
2 0
Correct Answer: C
Question 3 Explanation:
![](https://solutionsadda.in/wp-content/uploads/2020/01/h6-1.jpg)
Hence
4 2
6 2
2 0
Subscribe
Login
0 Comments