ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2254)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
Question
write a c program to print "Welcome" without using semicolon
in the whole program ??
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
main()
{
if(printf("Welcome"))
//Do nothing
}
 
Is This Answer Correct ?    45 Yes 17 No
VadivelT
 
Answer
# 2
main()
{
if(printf("Welcome"))
{
}
}
 
Is This Answer Correct ?    27 Yes 9 No
Sagar
 
 
 
Answer
# 3
main()
{
if(printf("Welcome"))
{
}
}

(OR)

main()
{
if(printf("Welcome"))
}
 
Is This Answer Correct ?    12 Yes 3 No
Rama Krishna Sidhartha
 
Answer
# 4
#include<stdio.h>
#include<conio.h>
void main(void)
{
if(printf("welcome"))
{}
}
 
Is This Answer Correct ?    3 Yes 0 No
Manoj Srivastava
 
Answer
# 5
main()
{
if(printf("Welcome"))
{}
}

for further queries and discussions, just check these out !!!

http://forum.campusmaniac.com/
http://www.campusmaniac.com/
 
Is This Answer Correct ?    4 Yes 2 No
Hari
 
Answer
# 6
main()
{
if(printf("welcome"))
{
}
}
 
Is This Answer Correct ?    5 Yes 3 No
Mani
 
Answer
# 7
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 ?    6 Yes 6 No
Sagar
 
Answer
# 8
#include<stdio.h>
#include<conio.h>
void main()
{
if(printf ("hi"))
getch();
}
 
Is This Answer Correct ?    0 Yes 0 No
Sandip Kundu
 
Answer
# 9
//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 ?    0 Yes 0 No
Peanut64
 
Answer
# 10
#include<stdio.h>
{
main()
while(printf("welcome"))
}
 
Is This Answer Correct ?    0 Yes 0 No
Kayalvizhi.s
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How to removing white spces in c programming only bu using loops   2
Give the logic for this #include<stdio.h> #include<conio.h> void main() { clrscr(); int a=10,b; b=++a + ++a; printf("%d", b); getch(); } Output: 24......How? Accenture 2
main() { printf("hello%d",print("QUARK test?")); }   5
what is foreign key in c language? ADP 1
how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); TCS 9
int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? Verifone 14
Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a)); printf("\nSize of 2.0 ::%d",sizeof(2.0));} IBM 11
what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }   2
Find the highest of three numbers and print them using ascending orders?   1
application of static variables in real time Bosch 1
what is structuer? Wipro 4
#define f(x) main() { printf("\n%d",f(2+2)); }   5
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com