C Hello World program without using a semicolon
kw.c
#include <stdio.h>
int main()
{
    if (printf("Hello, World!\n"))
    {
    }

    while (!printf("Hello, World!\n"))
    {
    }

    switch (printf("Hello, World!\n"))
    {
    }
}
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./a.out Hello, World! Hello, World! Hello, World! kodingwindow@kw:~$
Advertisement