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
52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2?
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
write a �Hello World� program in �c� without using a
semicolon?

#include<stdio.h>
main()
{
if(printf("Hello World \n"))
{
}
}

This will work perfectly.
 
Is This Answer Correct ?    290 Yes 42 No
V.srinivasan
 
Answer
# 2
Hi Sujatha,

Program for your question no.52.

#include<stdio.h>
main()
{
if(Printf("Hello World!!!"))
}
Here I didn't use semicolon, I hope I met your criteria.
 
Is This Answer Correct ?    261 Yes 133 No
Devarathnam .c, S.v.university
 
 
 
Answer
# 3
if(printf("HELLO WORLD")) 
Is This Answer Correct ?    38 Yes 15 No
Sandeep
 
Answer
# 4
#include<stdio.h>
void main()
{
if(printf("hello world"))
}
 
Is This Answer Correct ?    41 Yes 22 No
Sagar Naik
 
Answer
# 5
#include<stdio.h>
main()
{
while(printf("Hello World \n"))
{
}
}
 
Is This Answer Correct ?    38 Yes 21 No
Saurabh
 
Answer
# 6
#inlcude<stdio.h>
void main()
{
if(printf("Hello world"))
{
}
}
 
Is This Answer Correct ?    14 Yes 6 No
Vikky_manit
 
Answer
# 7
#include<stdio.h>
#include<conio.h>
void main()
{
while(!printf("Hell, this is aptech"))
{
}
}
/*after compilation and execution,press alt+f5 to see the
result */
 
Is This Answer Correct ?    7 Yes 2 No
Surekha
 
Answer
# 8
#inlclude<stdio.h>
void main()
{
while(printf("hello word\n"))
{
}
}
 
Is This Answer Correct ?    5 Yes 3 No
Saurabh Kumar Singh
 
Answer
# 9
a program to print a string i am in allahabad without using
a semicolon.
#include<stdio.h>
#include<conio.h>
void main()

{
if(printf(" i am in allahabad"))
getch();
}
 
Is This Answer Correct ?    4 Yes 2 No
Anshukumarsrivastava.
 
Answer
# 10
#include<stdio.h>
main()
{
while(printf("hello world"))
{
}
return(0);
}
 
Is This Answer Correct ?    2 Yes 0 No
Deepak Kumar
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
1. Duplicate the even numbers. -1 Sample I/O Array1:- 4,2,24,3,22 Updated Array:- 4,4,2,2,24,24,3,22,22 2. Reverse the array in a region - 1 Sample I/O Array1:- 4,2,24,3,22,41,21 Enter Region:- 2,5 Update Array:-4,41,22,3,24,2,21 3. Store first the even digits in an array and then odd digits in same array -2 Sample I/O Array1:- 4,2,24,3,22,41,21 Array 2:- 4,2,2,4,2,2,4,2,3,1,1 4. Store the count of the digits in all numbers in an array and print the count. -2 Sample I/O Array1:- 4,2,9,3,7,41,28 Array 2:- 0,1,1,1,2,0,0,1,1,1 1-1;2-1;3-1;4-2;7-1;8-1;9-1 5. Store all palindrome numbers in to another array -2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array 2:- 4,22,9,313,141 6. Arrange the array in such a way that odd numbers come first and then even numbers -1 Sample I/O Array1:- 4,22,9,313,7,141,28 Update Array1:- 9,313,7,141,4,22,28 7. Store into another array by inserting it in the right place - 2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array2:- 4 /4,22 /4,9,22 /4,9,22 ,313 /4,7,9,22 ,313 /4,7,9,22 ,141,313 / 4,7,9,22,28 ,141,313 8. Merge two sorted arrays in a sorted fashion - 3 Sample I/O Array 1:- 3,6,7,9,11,16 Array 2:- 1,2,5,7,20 Array 3:- 1,2,3,5,6,7,9,11,16,20 9. Upadte the array so that an array element is followed by its revere - 1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:- 13,31,63,36,74,47,9,9,11,11,16,16 10.Spread the digits of the array in the same array. -1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:-1,3,6,3,74,9,1,1,1,6 11.Shift the boundary of array to have only 2 digit numbers. Sample I/O Array 1:- 139,643,74,9,101,126 Updated Array 1:- 13,96,43,74,91,11,26 12.Print the largest occuring digit in an array of N numbers. Sample I/O Array 1:- 13,63,74,9,11,16 1 occurs most. Intel 2
Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); } ADITI 2
how to return 1000 variables from functio9n in c?plz give me code also   6
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));   2
when i declare as: void main() { clrscr(); int a=10; printf("%d",a) } my problem that why generate a error in above programs. please tell me answer seriously .   4
char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable) Mascot 7
What is structure padding & expalain wid example what is bit wise structure?   1
what is the difference between declaration and definition of a variable or function ?   3
#include<stdio.h> main() { int a=1; int b=0; b=++a + ++a; printf("%d %d",a,b); } Infosys 7
What is Lazy evaluation in C? Give an example.   1
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10 Aspire 8
what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); } Motorola 1
 
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