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 (2265)
 C++ interview questions  C++ Interview Questions (1119)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
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 ?    47 Yes 17 No
VadivelT
 
Answer
# 2
main()
{
if(printf("Welcome"))
{
}
}
 
Is This Answer Correct ?    28 Yes 9 No
Sagar
 
 
 
Answer
# 3
main()
{
if(printf("Welcome"))
{
}
}

(OR)

main()
{
if(printf("Welcome"))
}
 
Is This Answer Correct ?    12 Yes 4 No
Rama Krishna Sidhartha
 
Answer
# 4
main()
{
if(printf("welcome"))
{
}
}
 
Is This Answer Correct ?    6 Yes 3 No
Mani
 
Answer
# 5
#include<stdio.h>
#include<conio.h>
void main(void)
{
if(printf("welcome"))
{}
}
 
Is This Answer Correct ?    3 Yes 0 No
Manoj Srivastava
 
Answer
# 6
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
# 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 ?    7 Yes 6 No
Sagar
 
Answer
# 8
//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 ?    1 Yes 0 No
Peanut64
 
Answer
# 9
#include<stdio.h>
{
main()
while(printf("welcome"))
}
 
Is This Answer Correct ?    1 Yes 0 No
Kayalvizhi.s
 
Answer
# 10
#include<stdio.h>
#include<conio.h>
void main()
{
if(printf ("hi"))
getch();
}
 
Is This Answer Correct ?    0 Yes 1 No
Sandip Kundu
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
HOW TO HANDLE EXCEPTIONS IN C   8
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6 TCS 7
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); } MICROSOFT 5
SIR PLS TELL ME THE CODE IN C LANGUAGE TO PRINT THE FOLLOWING SERIES 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1   4
Write a c program to print the sizes and ranges of different data types in c?   1
What is the difference function call by value & function call by reference?   6
diff .between strcture and union   2
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(%x, -1<<4); ? 47.will the program compile? int i; scanf(%d,i); printf(%d,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion? AMDOC 6
to find out the reverse digit of a given number Infosys 6
Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NODE*next;int x;};type def struct node NODE; B)typedef struct NODE {struct NODE *next;int x;}; C)typedef struct NODE {NODE *next;int x;}; D)typedef struct {NODE *next;int x;}NODE; Accenture 5
what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }   6
. Consider the following program main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is (A) 1 (B) 3 (C) -6 (D) none Oracle 8
 
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