Discussion in 'C' started by HARIT, Aug 11, 2011.
Write a C program without any semicollon (..
by writing above if statement printf() function returns a non zero value
but we have not given any statement under it so it will just print CFANATIC
You have a semicolon in getch statement
The same coding when written in vi editor of LINUX it will also work without a getch();
Doesn't it require a return statement.........????
actually getch statement is not compulsory
i have written by mistake
getch is just needed for turbo c compiler usually 3.0
to show us output (i.e.., it has to read a key)
sophisticated compilers need not need that
What the Non-Zero value printf() returns ??
Actually I am asked "How a C programe can be write without semicolon?"
I think it indicates any processes by which we can capable to code any C programme without using semicollon....
it actually returns a non zero value (i.e.., TRUE)
but there are no statement under if statement
so it will just print what it is in printf statement
what the exact value(non-zero) returned by printf()....?
Separate names with a comma.