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 differnence b/w macro & functions

1 Answers  


struct ptr { int a; char b; int *p; }abc; what is d sizeof structure without using "sizeof" operator??

9 Answers   Verifone,


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

0 Answers  


write a program to compare 2 numbers without using logical operators?

5 Answers   IBM,


Can we change the value of static variable in c?

0 Answers  






How can I write a function analogous to scanf?

0 Answers  


Does c have an equivalent to pascals with statement?

0 Answers  


Place the #include statement must be written in the program?

0 Answers  


52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?

9 Answers  


What are the types of pointers in c?

0 Answers  


What are variables c?

0 Answers  


what is the importance of spanning tree?

0 Answers  


Categories