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

Why pointers are used?

0 Answers  


Why is c used in embedded systems?

0 Answers  


how to find anagram without using string functions using only loops in c programming

0 Answers  


write a program in c language to print your bio-data on the screen by using functions.

0 Answers  


How can I manipulate individual bits?

0 Answers  






What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

0 Answers  


can we have joblib in a proc ?

0 Answers  


write a program to display & create a rational number

1 Answers   HCL, TCS,


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

0 Answers   IBM,


Define function pointers?

1 Answers  


write a program to display the numbers in the following format 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4

9 Answers   IBM, NIIT, Winit,


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

0 Answers  


Categories