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

what is the meaning of java that is (J A V A) full form of JAVA

71 Answers   AKS University, Bhel, BNL, BPO, HCL, Peacecon,


What is #line?

0 Answers  


program for comparing 2 strings without strcmp()

4 Answers  


How can I get back to the interactive keyboard if stdin is redirected?

0 Answers  


what is the difference between embedded c and turbo c ?

1 Answers  


nic scientist exam

1 Answers   NIC,


How macro execution is faster than function ?

0 Answers   Wipro,


can please someone teach me how to create this program using while statement.. this is the output should look like 0 2 4 6 8 10 -thanks.. :) need it asap...

7 Answers  


How can I send mail from within a c program?

0 Answers  


Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me

7 Answers  


Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.

3 Answers   Infosys,


what is disadvantage of pointer in C

13 Answers   Tech Mahindra,


Categories