AD1

Monday, 9 January 2017

What will be the output of the following program


#include <stdio.h>
int main()
{
static int count=5;
printf ("count = %d\n", --count);
if (count!= 0)
main() ;
return 0;
}
view raw static.c hosted with ❤ by GitHub
output is
count=4
count=3
count=2
count=1
count=0

No comments:

Post a Comment