C Program To Display Hello Without Using Semicolon
In C/C++ a semicolon is used to terminate the statement.But if,while,switch(conditional constructs) do not require a semicolon to terminate.So if we use the printf statement inside these conditional constructs,then we do not require any semicolon to terminate the statement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
while(!printf("Hello World Without Using Semicolon")){} | |
if(printf(getch())){} | |
} |
It would be nice if you can use syntax highlighter for the code.
ReplyDelete