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   interview questions urls   External Links  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
Question
#define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
  int i = 10, j = 5, k = 0;
  k = MAX(i++, ++j);
  printf("%d %d %d", i,j,k);
}

what will the values of i , j and k?
}
 Question Submitted By :: Sid08
I also faced this Question!!     Rank Answer Posted By  
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 1
12 6 11
 
0
Guest
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 2
11 , 6, 10
 
0
Sumi
 
 
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 3
12 6 11
 
0
Sshireesha
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 4
i=12
j=6
k=11
 
0
Vignesh1988i
[Nil]
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 5
x=11

k=11

j=6
 
0
Guest
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 6
i=12
j=6
k=11
 
0
Vignesh1988i
 
  Re: #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
Answer
# 7
i=11 j=6 k=10
 
0
Amitesh
 
 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
a 'c' program to tell that the set of three coordinates lie on a same line Persistent1
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast. Verifone3
define function Assurgent4
How to access or modify the const variable in c ? HP2
two variables are added answer is stored on not for third variable how it is possible?  2
write a program to check whether a given integer is a strong number or not? [Hint: 145=1!+4!+5! =1+24+120 =145]  1
N O S I E R + A S T R A L ---------------- 7 2 5 6 1 3 Honeywell1
Concat two string with most overlapped substring has to remove  "abcd"+ "cdef" = "abcdef  4
which will be first in c compiling ,linking or compiling ,debugging. Sonata2
What is the Difference between Macro and ordinary definition? Motorola2
wap in c to accept n number display the highest and lowest value  2
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type  4
what is the hexidecimal number of 4100? Google13
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case TCS5
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } CitiGroup2
int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15 Wipro6
What is the memory allocated by the following definition ? int (*x)(); ADITI2
write a programme that inputs a number by user and gives its multiplication table.  1
Find Index of least significant bit set in an Integer. ex. int value is say 10001000 results should be 4.  1
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x); HCL4
 
For more C Interview Questions Click Here 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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