[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Variables & Data Types - Discussion

Home > C Programming > Variables & Data Types > MCQs Questions Discussion

44 / 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;
}

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 :: TCS

Post Your Answer Here:     

No Discussion on this question yet!