I have executed it in ideone nd it is showing infinite no of hello nd it should be bccause in the first line of the main function
printf( "hello") will print a single hello.In the next line we r calling f() which is calling main() which first prints hello and then again calls f() and then main().............it goes on infinetly .....so the programm is not going to execute
printf("%d",a);
return 0;
of main function ever and return 8 of f() function .so,a will never contain 8 nd 8 will never be printed .
calling main recursively should be avoided but using main recursively is not illegal. See the link
http://stackoverflow.com/questions/21941040/calling-main-function-in-c