C Program to Print Hello word without using semicolon
Part 1 : Printf Hello word in C without using semicolon [only ones ]
1 2 3 4 5 6 7 | #include<stdio.h> void main() { if(printf("Hello")) { } } |
Output :
1 | Hello |
Part 2 : Printf Hello word in C without using semicolon [infinite times]
1 2 3 4 5 6 7 | #include<stdio.h> void main() { while(printf("Hello")) { } } |
Part 3 : Printf Hello [Using Switch]
1 2 3 4 5 6 7 | #include<stdio.h> void main() { switch(printf("Hello")) { } } |
Part 4 : Using Else-if Ladder
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include<stdio.h> void main() { if(printf("")) { } else if (printf("Hello")) { } else { } } |
Part 5 : Printf Hello [Using While and Not]
1 2 3 4 5 6 7 | #include<stdio.h> void main() { while(!printf("Hello")) { } } |
Part 6 : Using #define
1 2 3 4 5 6 7 8 | #include<stdio.h> #define PRINT printf("Hello") void main() { if(PRINT) { } } |