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

can we print any string in c language without using semicolon(;)(terminator) in whole program.

11 Answers  


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

0 Answers   Celstream,


What is string length in c?

0 Answers  


Explain what is the difference between a string and an array?

0 Answers  


1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?

2 Answers   nvidia,






how to swap two nubers by using a function with pointers?

1 Answers  


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

1 Answers   TCS,


can you change name of main()?how?

3 Answers   HCL, Siemens,


Are pointers really faster than arrays?

0 Answers  


Explain what standard functions are available to manipulate strings?

0 Answers  


Why cann't whole array can be passed to function as value.

1 Answers  


declare afunction pointer to int printf(char *)?

1 Answers   HCL,


Categories