Write a program or provide a pseudo code to flip the 2nd bit
of the 32 bit number ! (Phone Screen)



Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)..

Answer / ankit parikh

x-OR the number with 0x02.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Interview Questions

What are static variables in c?

0 Answers  


How to write a multi-statement macro?

0 Answers  


How do you access command-line arguments?

1 Answers  


write a program structure to find average of given number

1 Answers  


What is the most efficient way to count the number of bits which are set in a value?

4 Answers  


number of times a digit is present in a number

0 Answers  


Output for following program using for loop only * * * * * * * * * * * * * * *

3 Answers  


How do I convert a string to all upper or lower case?

0 Answers  


What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

3 Answers   Accenture,


what is difference between overriding and overloading?

1 Answers  


write a program for even numbers?

19 Answers   TCS,


What is the use of sizeof () in c?

0 Answers  


Categories