C program to print hello world without using semicolon


Levels of difficulty: / perform operation:


Program 1:

#include<stdio.h>
void main(){
    if(printf("Hello world")){
    }
}


Result

Hello world







Program 2:

#include<stdio.h>
void main(){
    while(!printf("Hello world")){
    }
}


Result

Hello world







Program 3:

#include<stdio.h>
void main(){
    switch(printf("Hello world")){
    }
}


Result

Hello world





Quantitative Aptitude
Reasoning
Programming
Interview