Monday, 20 July 2015

Write a c program to print Hello world without using any semicolon.

C hello world program: c programming language code to print hello world. This program prints hello world, printf library function is used to display text on screen, '\n' places cursor on the beginning of next line, stdio.h header file contains declaration of printf function. The code will work on all operating systems may be its Linux, Mac or any other and compilers. To learn a programming language you must start writing programs in it and may be your first c code while learning programming.

Write a c program to print Hello world without using any semicolon.

Solution: 1

void main(){

if(printf(“Hello world”)){

}

}

Solution: 2

/* Hello World program */

void main(){

while(!printf(“Hello world”)){

}

}


Solution: 3

void main(){

switch(printf(“Hello world”)){

}

}


No comments:

Post a Comment