0 0 votes #include<stdio.h> int K = 10; int main() { foo(); foo(); return 0; } int foo() { static int k= 1; printf("%d ",k); k++; return 0; } What is the output of the above code snippet? $2,3$ $1,2$ $1,3$ $2,4$ Programming in C tbb-programming-2 programming-in-c static-single-assignment output + – Bikram 592 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote ans B 1st time foo is called then k=1 pf(1) k=2 2nd time foo is called then k=2 pf(2) k=3 op=1,2 JAINchiNMay answered Jun 14, 2021 JAINchiNMay comment Share Follow 0 reply Please log in or register to add a comment.