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
how does the C compiler interpret the following two statements
   p=p+x;
   q=q+y;
   a.p=p+x;
     q=q+y
   b.p=p+xq=q+y                      
   c.p=p+xq;
     q=q+y          
   d.p=p+x/q=q+y
 Question Submitted By :: Sumalatha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y
Answer
# 1
a.p=p+x;
     q=q+y
 
Is This Answer Correct ?    2 Yes 0 No
Sundeep
 
  Re: how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y
Answer
# 2
b.p=p+xq=q+y
 
Is This Answer Correct ?    0 Yes 1 No
Venkat
 
 
 
  Re: how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y
Answer
# 3
Venkat can you please explain why the behaviour is going to 
be like this (what you have mentioned) ?
Because the ";" should be signifying the termination for 
the first line.
 
Is This Answer Correct ?    0 Yes 0 No
Bibaswan.guha
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How to write a code for random pick from 1-1000 numbers? The output should contain the 10 numbers from the range 1-1000 which should pick randomly, ie ,for each time we run the code we should get different outputs. NetApp12
Give a method to count the number of ones in a 32 bit number?  1
Write a C program that reads a series of strings and prints only those ending in "ed"  2
I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?  3
main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output?? Ramco13
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);  1
print ur name without using any semicolon in c/c++....  6
main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }  5
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error HCL4
How do you write a program which produces its own source code as its output?  3
n=7623 { temp=n/10; result=temp*10+ result; n=n/10 } Wipro4
In the following control structure which is faster? 1.Switch 2.If-else and which consumes more memory?  4
Which of the following about automatic variables within a function is correct ? a.its type must be declared before using the variable b.they are local c.they are not initialised to zero d.they are global. TCS3
write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview Satyam2
Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ 3) char x=12;  5
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6 TCS5
What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?  1
what is op? for(c=0;c=1000;c++) printf("%c",c); Trigent18
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program Subex3
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green") Cadence4
 
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