Can anybody help me explain this question from a past exam paper? When I compile it, it is never satisfied with any input. Also, what is the reason for the self calling main function?
What does the following program do? Justify your answer.
#include <stdio.h>
int main ( void ) {
int c;
if (( c = getchar() ) != EOF) {
main();
printf("%c", c);
}
return 0;
}