Description

Lets write a C program to print the message without using semicolon. We can easily write the message by using printf("Hello World!"); in the main() function in c. But there we use the semicolon to print this statement at the end of the line. For avoid the semicolon follow the some tricks...

Using while loop

#include<stdio.h>

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

Using switch statement

#include<stdio.h>

void main(){
    switch(printf("Hello World!")){}
}

Using if statement

#include<stdio.h>

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

 

Please Comment....

Comments

Login is mandatory to comment Please login

Recommended Posts

Function call by value in c programming language

The call by value technique of passing arguments to a function copies the particular value of an argument into the formal parameter of the function.

Call by Reference in C programming language

When we call a function and pass the variable / parameter in the function, when passing the address of the actual arguments from the calling function, that's why it is called call by reference.

C program to replace vowels with special characters

Write a c program to replace vowels with special characters.

File Read in C | File Handling | How to Read File

Write a program to read the file in c File Handling. How to read file is the main topic of file handling.

Insertion and deletion in doubly linked list in C program

Insertion and Deletion in Doubly linked list in C programming langauge Data Structure. How to Implement insertion and deletion all operation.

C program to check eligible for vote

Write a program to check that person is eligible for voting or not.