In the following code segment what will be the result of the
function,
value of x , value of y

{
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
}

a) same, MAXINT, -1
b) not same, MAXINT, -MAXINT
c) same , MAXUNIT, -1
d) same, MAXUNIT, MAXUNIT
e) not same, MAXINT, MAXUNIT



In the following code segment what will be the result of the function, value of x , v..

Answer / guest

Ans. A

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More C Interview Questions

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.

6 Answers   HCL,


What is the mean of this statement:: if(int i=0 * i=9)

2 Answers   HCL,


What are the advantage of c language?

0 Answers  


Is c++ based on c?

0 Answers  


What is new line escape sequence?

0 Answers  






what is output of the following statetment?Printf(“%x”, -1<<4); ?

5 Answers  


12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV

4 Answers   Accenture,


What is the meaning of typedef struct in c?

0 Answers  


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

0 Answers  


What is the use of function in c?

0 Answers  


can we have joblib in a proc ?

0 Answers  


How can you find out how much memory is available?

0 Answers  


Categories