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

#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300

4 Answers   Tieto,


what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(“ %d\n”,sum); } what is the difference between a=10 and a=010??

3 Answers   Oracle,


why do we use # in c-language?

1 Answers  


Is null equal to 0 in sql?

0 Answers  


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

0 Answers   Wipro,


why r u join this company? give solid resons.

16 Answers   IBM, Infosys, TCS,


Which header file is essential for using strcmp function?

0 Answers  


The variables are int sum=10,SuM=20; these are same or different?

3 Answers  


What is a dynamic array in c?

0 Answers  


What is the translation phases used in c language?

0 Answers  


write a own function for strstr

1 Answers   LG Soft,


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

0 Answers   Huawei,


Categories