Write a C program that will accept a hexadecimal number as
input and then display a menu that will
permit any of the following operations to be carried out:

Display the hexadecimal equivalent of the one's complement.
(b) Carry out a masking operation and then display the
hexadecimal equivalent of the result.
(c) Carry out a bit shifting operation and then display the
hexadecimal equivalent of the result.
(d) Exit.

If the masking operation is selected, prompt the user lor
the type of operation (bitwise and, bitwise exclusive
or, or bitwise or) and then a (hexadecimal) value for the
mask. If the bit shifting operation is selected.
prompt the user for the type of shift (left or right), and
then the number of bits.
Test the program with several different (hexadecimal) input
values of your own choice.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

WHO WROTE C LANGUAGE?

4 Answers  


write a programme that inputs a number by user and gives its multiplication table.

2 Answers  


Can we use any name in place of argv and argc as command line arguments?

0 Answers  


int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?

7 Answers   Parimal, Wipro,


Taking an example,differentiate b/w loader and linker ?

1 Answers  






difference between c and c++

3 Answers  


The differences between Windows XP and Windows Visa

8 Answers   HCL,


how can f be used for both float and double arguments in printf? Are not they different types?

0 Answers  


How can I increase the allowable number of simultaneously open files?

1 Answers   ABC,


What is meant by inheritance?

0 Answers  


main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 Answers  


What is I ++ in c programming?

0 Answers  


Categories