C programming Printing without using semicolon(;)
------------------------------------------------------------------------------------------------------
if - Printf Hello word in C without using semicolon [only ones ]
------------------------------------------------------------------------------------------
#include<stdio.h>
void main()
{
if(printf("Hello"))
{
}
}
--------------------------------------------------------------------------------------------------------------
while - Printf Hello word in C without using semicolon [infinite times]
----------------------------------------------------------------------------------------------------------------
#include<stdio.h>
void main()
{
while(printf("Hello"))
{
}
}
--------------------------------------------------------------------------------------------------------------
switch - Printf Hello word in C without using semicolon
----------------------------------------------------------------------------------------------------------------
#include<stdio.h>
void main()
{
switch(printf("Hello"))
{
}
}
--------------------------------------------------------------------------------------------------------------
if - "else" - Printf Hello word in C without using semicolon
----------------------------------------------------------------------------------------------------------------
#include<stdio.h>
void main()
{
if(printf(""))
{
}
else if (printf("Hello"))
{
}
else
{
}
}
--------------------------------------------------------------------------------------------------------------
define - Printf Hello word in C without using semicolon
----------------------------------------------------------------------------------------------------------------
#include<stdio.h>
#define PRINT printf("Hello")
void main()
{
if(PRINT)
{
}
}
No comments:
Post a Comment