C Programming :: Variables & Data Types - Discussion
Home > C Programming > Variables & Data Types > MCQs Questions Discussion
503 / 51
In the following code segment what will be the result of the function
#include<stdio.h>
int main(){
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
printf("%u %d",x,y);
return 0;
}
#include<stdio.h>
int main(){
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
printf("%u %d",x,y);
return 0;
}
Asame, and x=MAXINT, y=-1
Bnot same, and x= MAXINT, y= -MAXINT
Csame , and x=MAXUNIT,y -1
Dsame, iand x=y=MAXUNIT
Enot same, and x=MAXINT, y=MAXUNIT
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!