can we print any string in c language without using
semicolon(;)(terminator) in whole program.

Answers were Sorted based on User's Feedback



can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / nitish_bhasin

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

Is This Answer Correct ?    54 Yes 11 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / vinothkumar.r

#include<stdio.h>
int main()
{
while(printf("Hai")&&0){}
}

Is This Answer Correct ?    42 Yes 15 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / abhradeep chatterjee

#include<stdio.h>
void main()
{
if(printf("Hello")){}
}
this is the correct answer.

Is This Answer Correct ?    22 Yes 4 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / gauravjeet singh gill

#include<stdio.h>
void main()
{
while(printf("hello")?0:1)
{
}
}

Is This Answer Correct ?    20 Yes 5 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / geeta

#include<stdio.h>
void main()
{
if(printf("Hello World!!!")!=0)
{}

}

Is This Answer Correct ?    11 Yes 3 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / k satish kumar reddy

main()
{
switch(printf("hello "))
{
}
}

Is This Answer Correct ?    5 Yes 1 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / vinnu bhardwaj

main()
{
if(printf("Hello world"))
{}
}
//Here the {} act as a blank compound statement. But it is
//not mandatory to put some simple statements in it which
//require a semicolon. There are many more such answers to
//this question but the basic funda will be same

Is This Answer Correct ?    5 Yes 5 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / taruna chaudhary

#include<stdio.h>
void main()
{
clrscr();
if("printf(hello pushpendra)")
getch();
}

Is This Answer Correct ?    4 Yes 5 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / praveen vinny

/*
What if I want to print the sum of two numbers inside a
string without using a semicolon
*/

#include<iostream.h>
void main()
{
int a,b;
if(cout<<"Please enter two numbers : ")
if(cin>>a>>b)
if(cout<<"Sum = "<<(a+b))
}

Is This Answer Correct ?    4 Yes 5 No

can we print any string in c language without using semicolon(;)(terminator) in whole program...

Answer / chandanakurukunda

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

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Interview Questions

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning

4 Answers   Accenture,


what is a headerfile?and what will be a program without it explain nan example?

6 Answers   Assurgent,


How can you tell whether two strings are the same?

0 Answers  


What is %d called in c?

0 Answers  


#include<stdio.h> #include<conio.h> void main() { char ch='\356'; printf("%d",ch); } o/p=-18 why?plz.explain

2 Answers  






Explain what is a static function?

0 Answers  


What is memory leak in c?

0 Answers  


What are different types of variables in c?

0 Answers  


in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

2 Answers   NetApp,


What are linker error?

0 Answers  


What is the symbol indicated the c-preprocessor?

0 Answers  


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,


Categories