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

Answer Posted / guest

Ans. A

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are low level languages?

636


What is memcpy() function?

622


Explain how do you print only part of a string?

650


What is %d used for?

585


What are the parts of c program?

636






What language is c written?

577


What are the disadvantages of a shell structure?

695


What is the difference between array and structure in c?

571


How do you override a defined macro?

702


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

649


When should structures be passed by values or by references?

585


Explain zero based addressing.

609


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

825


What are the back slash character constants or escape sequence charactersavailable in c?

686


Explain what is page thrashing?

611