DEV Community

realNameHidden
realNameHidden

Posted on

How to print “Hello” in C without using a semicolon?


#include <stdio.h>

int main()
{
    if(printf("Hello World\n")){

    }
    switch(printf("Hello World\n")){

    }
    while(!printf("Hello World")){

    }
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
pauljlucas profile image
Paul J. Lucas

Who cares? It's a silly question that should never be asked at all much less in an interview.