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

process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

0 Answers   InterGraph,


3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r

3 Answers   Huawei,


what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these

2 Answers   IBM,


hi send me sample aptitude papers of cts?

0 Answers  


What is the output of the following program main();{printf ("chennai""superkings"}; a. Chennai b. superkings c. error d. Chennai superkings

6 Answers  






How can I find out the size of a file, prior to reading it in?

0 Answers  


What is volatile variable how do you declare it?

0 Answers  


Write program to remove duplicate in an array?

0 Answers  


Difference between Shallow copy and Deep copy?

0 Answers  


What are the 32 keywords in c?

0 Answers  


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these names could be kept in that shelf as in this example: bottom of shelf ---> [AAAJKRDFDEWAAYFYYKK]-----Top of shelf. All these packets are to be loaded on cars. The cars are lined in order, so that the packet could be loaded on them. The cars are also named [A, B, C, D, E,………….]. Each Car will load the packet with the same alphabet. So, for example, car ‘A’ will load all the packets with name ‘A’. Each particular car will come at the loading point only once. The cars will come at the loading point in alphabetical order. So, car ‘B’ will come and take all the packets with name ‘B’ from the shelf, then car ‘C’ will come. No matter how deep in the shelf any packet ‘B’ is, all of the ‘B’ packets will be displaced before the ‘C’ car arrives. For that purpose, some additional shelves are provided. The packets which are after the packet B, are kept in those shelves. Any one of these shelves contains only packets, having the same name. For example, if any particular shelf is used and if a packet with name X is in it, then only the packets having names X will be kept in it. That shelf will look like [XXXXXXX]. If any shelf is used once, then it could be used again only if it is vacant. Packets from the initial shelf could be unloaded from top only. Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

0 Answers   Infosys,


Categories