Hello World

Hello world is the first program that everyone write. Here is the program in C:

#include <stdio.h>

int main()
{
   printf("Hello World");
   return 0;
}

We can write the above program without using any semicolon (;). There are three ways to do that.

#1. Using While Loop:

#include <stdio.h>

void main()
{
    while(printf("Hello World")){
    }
}

#2. Using Conditional Logic

#include <stdio.h>

void main()
{
    if(printf("Hello World")){
    }
}

#3. Using Switch:

#include <stdio.h>

void main()
{
    switch(printf("Hello World")){
    }
}
Newer Post
Previous
This is the last post.

0 comments :

Post a Comment

Spam comments will be deleted. :)

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
<>
TOP