can we print any string in c language without using
semicolon(;)(terminator) in whole program.
Answers were Sorted based on User's Feedback
Answer / nitish_bhasin
#include<stdio.h>
void main()
{
if(printf("Hello")){}
}
Is This Answer Correct ? | 54 Yes | 11 No |
#include<stdio.h>
int main()
{
while(printf("Hai")&&0){}
}
Is This Answer Correct ? | 42 Yes | 15 No |
Answer / abhradeep chatterjee
#include<stdio.h>
void main()
{
if(printf("Hello")){}
}
this is the correct answer.
Is This Answer Correct ? | 22 Yes | 4 No |
Answer / gauravjeet singh gill
#include<stdio.h>
void main()
{
while(printf("hello")?0:1)
{
}
}
Is This Answer Correct ? | 20 Yes | 5 No |
Answer / geeta
#include<stdio.h>
void main()
{
if(printf("Hello World!!!")!=0)
{}
}
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / k satish kumar reddy
main()
{
switch(printf("hello "))
{
}
}
Is This Answer Correct ? | 5 Yes | 1 No |
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 |
Answer / taruna chaudhary
#include<stdio.h>
void main()
{
clrscr();
if("printf(hello pushpendra)")
getch();
}
Is This Answer Correct ? | 4 Yes | 5 No |
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 |
Answer / chandanakurukunda
#include<stdio.h>
void main()
{
if(printf("hello"))
{
}
}
Is This Answer Correct ? | 2 Yes | 4 No |
program to find which character is occured more times in a string and how many times it has occured? for example in the sentence "i love india" the output should be i & 3.
What is a double c?
Is there any data type in c with variable size?
what is the difference between embedded c and turbo c ?
Where can I get an ansi-compatible lint?
Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 to 1;
18 Answers Accenture, Cisco, Egentec, HCL, Ideaz, Infosys, M-Systems, MYR, TCS,
Write a c pgm for leap year
11 Answers College School Exams Tests, IBM, TCS,
Can you assign a different address to an array tag?
What is sizeof c?
Write a program that his output * *** *****
What is the role of this pointer?
What is difference between far and near pointers?