C program to use printf() without semicolon " ; "

C program to use printf( ) funtion without using semicon.

/* C program to swap values*/
#include<stdio.h>
int main()
{
    /*In if, condition will execute
    * whether its true of FALSE*/
    if(printf("In If Condition"))
    {
        
    }
    
    /*In switch, condition will execute
    * whether its true or false*/
    switch(printf("\nIn Swich Condition"))
    {
        
    }
    return 0;
}

Output:

In If Condition
In Swich Condition

Share:

Related Posts:

Post a Comment

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.