How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST
Answer Posted / narendra
#define TURN_OFF_BIT_LAST(x) ((~0) >> 1) & x)
in the question it is asking to clear MSB not LSB
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is void pointers in c?
Why we write conio h in c?
Is main is a keyword in c?
What are the types of type qualifiers in c?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What are inbuilt functions in c?
Explain what is wrong with this statement? Myname = ?robin?;
What is the right way to use errno?
With the help of using classes, write a program to add two numbers.
What are formal parameters?
What is the difference between single charater constant and string constant?
When should a type cast not be used?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
How would you obtain the current time and difference between two times?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist