Question: Write a C program that would take a integer as a input from the console, and convert it into the binary and hexadecimal representation. You

Write a C program that would take a integer as a input from the console, and convert it into the binary and hexadecimal representation. You are not allowed to use any format specifier like %x, or %o etc, to display the binary or hexadecimal representation. Sample input and output are:

Input Output
98

Binary:1100010

Hex: 62

44

Binary: 101100

Hex: 2C

174

Binary: 10101110

Hex: AE

Part 2: Write a C program to print the size of different data types. Those data types would be char, integer, double, unsigned int, unsigned char.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!