A
ankursinha
Hi,
Is it possible to write a C program that prints "Hello World" on screen without
having a single semi-colon in the entire program?
The extra constraint here is that u r not allowed to use if,while,switch etc.
So far,i figured this could be done by insertint the printf statement in main
as shown:
int main(int argc=printf("Hello world")
{
}
Note:This is not allowed in ANSI C,default arguments are more a C++ concept.
Even this doesnt work.It compiles & runs but doesnt print anything.
Is the solution to this question possible in c(or c++ for that matter)?
Is it possible to write a C program that prints "Hello World" on screen without
having a single semi-colon in the entire program?
The extra constraint here is that u r not allowed to use if,while,switch etc.
So far,i figured this could be done by insertint the printf statement in main
as shown:
int main(int argc=printf("Hello world")
{
}
Note:This is not allowed in ANSI C,default arguments are more a C++ concept.
Even this doesnt work.It compiles & runs but doesnt print anything.
Is the solution to this question possible in c(or c++ for that matter)?