Write a c program to print hello world without using semicolon. This is simple programming interview question. There very simple trick , we can avoid semicolon using if key word in c or c++.
#include<stdio.h> int main() { if( printf("Hello World\n")) return 0; }
c program to print hello world without using semicolon using switch
#include<stdio.h> int main() { switch( printf("Hello World\n")) return 0; }
c program to print hello world without using semicolon using for
#include<stdio.h> int main() { for( printf("Hello World\n");;) return 0; }
c program using while
include<stdio.h> int main() { while( printf("Hello World\n")) return 0; }
Learn more interview questions on http://wikistack.com/category/interview-question/
WE RECOMMEND RELATED POST
The post c program to print hello world without using semicolon appeared first on wikistack.