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

How do you do dynamic memory allocation in C applications?

626


What are identifiers in c?

628


Why is it usually a bad idea to use gets()? Suggest a workaround.

894


i have a written test for microland please give me test pattern

2175


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

683






Write a program to print numbers from 1 to 100 without using loop in c?

633


How can I avoid the abort, retry, fail messages?

651


What is calloc()?

623


What is spark map function?

578


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

1953


What is pointers in c with example?

574


What are the features of c languages?

624


What is an auto keyword in c?

636


How can I delete a file?

626


Explain the difference between #include "..." And #include <...> In c?

621