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

When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

0 Answers   HCL,


You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;i<n1-1;i++) { if( !( (a1[i]>a1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

0 Answers   Facebook,


program to find the ASCII value of a number

8 Answers  


Write a program to show the change in position of a cursor using c

0 Answers  


What is that continue statement??

4 Answers  






printf("%d",(printf("Hello")); What it returns?

32 Answers   TCS,


9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?

1 Answers  


#include<std.h> int main() { char *str[]={"Frogs","Do","Not","Die","They","Croak!"}; printf("%d %d\n",sizeof(str),strlen(str)); ...return 0; } what will the output of the above program?

6 Answers  


What is the difference between constant pointer and constant variable?

0 Answers   NIIT,


Why should I use standard library functions instead of writing my own?

0 Answers  


what is ram?

3 Answers   TCS,


What is a far pointer in c?

0 Answers  


Categories