Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Program in C to print your message without using semicolon

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 665
    Comment on it

    Program:

    You can print your message in C with using a semicolon. Let see how?

    e.g. Let us print the message Welcome in C.

    There is three ways:

    1. Using switch:

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

    2. Using if:

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

    3. Using while loop:

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

    When you run this code snippets, you will get the output as "Welcome". 

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: