write a c program to print "Welcome" without using semicolon
in the whole program ??
Answers were Sorted based on User's Feedback
Answer / vadivelt
main()
{
if(printf("Welcome"))
//Do nothing
}
Is This Answer Correct ? | 50 Yes | 18 No |
Answer / rama krishna sidhartha
main()
{
if(printf("Welcome"))
{
}
}
(OR)
main()
{
if(printf("Welcome"))
}
Is This Answer Correct ? | 13 Yes | 5 No |
Answer / manoj srivastava
#include<stdio.h>
#include<conio.h>
void main(void)
{
if(printf("welcome"))
{}
}
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / sagar
try your self to run the above program then it wouldn't
display but then press (alt+F5) then u would get the
correct display
and....
its not possible with while loop ....
Is This Answer Correct ? | 8 Yes | 6 No |
Answer / peanut64
//C++
#include <iostream>
using namespace std;
void main()
{
while((cout<<"hello"<<endl)==false)
{
}
}
//c
#include <stdio.h>
void main()
{
while(printf("Hello")==false)
{
}
}
[My lecturer asked me this question. The above solution
works for me]
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / kayalvizhi.s
#include<stdio.h>
{
main()
while(printf("welcome"))
}
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sandip kundu
#include<stdio.h>
#include<conio.h>
void main()
{
if(printf ("hi"))
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
What is the size of empty structure in c?
whitch value return void main?
can we declare a function in side the structure?
What is Memory leakage ?
What are static variables in c?
What Is The Difference Between Null And Void Pointer?
#include<stdio.h> int fun(); int i; int main() { while(i) { fun(); main(); } printf("hello \n"); return 0; } int fun() { printf("hi"); } answer is hello.how??wat is tat while(i) mean?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
What is the use of c language in real life?
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?
i am using gsm modem ! I USE CMGL COMMAND TO DISPLAY THE LIST OF MESSAGES ! I WANT TO READ EACH MESSAGE ONE BY ONE AND GET EACH MESSAGE INDEX USING C PROGRAM ! THE RESPONSE OF THE MODULE AFTER AT+CMGL IS ---CMGL: 1,"REC READ","+85291234567",,"07/05/01,08:00:15+32",145,37 It is easy to list SMS text messages.---- I WANT THE PROGRAM TO GET THE NUMBER "37"{MESSAGE LENGTH} AS WELL AS "1"(MESSAGE INDEX NUMBER" PLEASE HELP
Is c compiled or interpreted?