ALLInterview.com :: Home Page KalAajKal.com
 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                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
main()
{
 int i=400,j=300;
 printf("%d..%d");
}
 Question Submitted By :: Surenda Pal Singh Chouhan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 1
400..300

Explanation:
printf takes the values of the first two assignments of the 
program. Any number of printf's may be given. All of them 
take only the first two values. If more number of 
assignments given in the program, then printf will take 
garbage values.
 
Is This Answer Correct ?    4 Yes 2 No
Surenda Pal Singh Chouhan
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 2
Hi Surenda,

I think the answer is a garbage value.. i tried in gcc & 
visual studio.. but i got garbage n both the case.. can u 
tell which compile u compiled & got this output.

Regards
Arun Raj
 
Is This Answer Correct ?    2 Yes 2 No
Arun Raj
 
 
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 3
output will b garbage value
because no variables are passed in last sentence.
 
Is This Answer Correct ?    1 Yes 2 No
Preshit
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 4
Answer: 

400 300

printf takes first two intilization values as default
 
Is This Answer Correct ?    1 Yes 4 No
Suresh Reddy
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 5
answer is garbage value because in printf statement there 
are no variables(i,j).
 
Is This Answer Correct ?    2 Yes 2 No
Manju
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 6
its machine Dependent

it displays garbage values in Linux

in some machines it will display 400 300
 as they are on the top of stack
 
Is This Answer Correct ?    1 Yes 2 No
Ravi
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 7
It prints only garbage value, since the variables x and y
were not metioned out side the bracket
 
Is This Answer Correct ?    0 Yes 3 No
Muthu
 
  Re: main() { int i=400,j=300; printf("%d..%d"); }
Answer
# 8
300..400
i.e second no and the first...........
 
Is This Answer Correct ?    2 Yes 0 No
Ifti/amir/shah
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above Accenture2
how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.  1
sir, i cannot find the way how to write aprogram by using array on queue IISIT1
Hai why 'c' is the middle language  2
program to find a smallest number in an array Microsoft5
program for comparing 2 strings without strcmp()  3
Why preprocessor should come before source code?  2
what is the defrenece between structure and union  5
what information does the header files contain? BSNL5
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort  5
without using arithmatic operator solve which number is greater??????????  1
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none TCS5
array contains zeros and ones as elements.we need to bring zeros one side and one other side in single parse. ex:a[]={0,0,1,0,1,1,0,0} o/p={0,0,0,0,0,1,1,1} Motorola7
Write a program to find the given number is odd or even without using any loops(if,for,do,while)  2
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+.... Ignou2
What is an volatile variable? HP12
which one low Priority in c? a)=,b)++,c)==,d)+  8
Difference between Class and Struct. Motorola6
what is the difference b/w compiler and debugger? Assurgent1
if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')  9
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com