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 |
Why is sprintf unsafe?
Write a function that accepts two numbers,say a and b and makes bth bit of a to 0.No other bits of a should get changed.
2 Answers Scientific Atlanta, Wipro,
how to find turn around time in operating system?
Can a variable be both const and volatile?
f(*p) { p=(char *)malloc(6); p="hello"; return; } main() { char *p="bye"; f(p); printf("%s",p); } what is the o/p?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is cohesion and coupling in c?
how to find the sizof of any datatype using bit manipulations
What is void c?
What are keywords in c with examples?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
Why n++ execute faster than n+1 ?