Computer Science, asked by rr932223, 4 months ago

What will be the output of following code?
//Assume necessary header files are present
#include<stdio.h>
void abc();
int main()
{
abc();
abc();
}
void abc)
{
static int x;
x=x+1;
printf("%d",x);
}
A. 1 2
B.O 1
C. 2 3
D. 2 2​

Answers

Answered by swastikmajumder
0

Answer:

answer is A 1 2 because static variable keeps its value.

Similar questions