Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. Enter the following C program, fill in the blanks, and make it work. Then answer the questions after the code. * Q1_echoNumbers.c Asks user

image text in transcribed
image text in transcribed
image text in transcribed
Q1. Enter the following C program, fill in the blanks, and make it work. Then answer the questions after the code. * Q1_echoNumbers.c Asks user to enter three unsigned integers, one in decimal, one in hexadecimal, and one in octal, then echoes them in three bases. */ 1) Test your program with these two sets of inputs (a) decForm: 253 , hexForm: 28fb, octForm: 4567; and (b) decForm: 4678, hexForm: abcdef, octForm: 776655. This also checks the conversion correctness of the same value in different number systems. Save your test results in the pdf file. 2) Using Q1_echoNumbers.c, how many bits are in the largest unsigned integer that is supported by this program? 3) Modify only the second printf statement in Q1_echoNumbers.c so that the hexadecimal value is displayed in signed integer decimal. What is the largest integer you can enter in hexadecimal while still getting "correct" output? 4) Modify the program Q1_echoNumbers.c so that it also displays the addresses of the decForm, hexForm, and octForm variables. The addresses should be displayed in hexadecimal. How many bytes does the compiler allocate for each of these integers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

Discuss the evolution of global business.

Answered: 1 week ago

Question

=+ how might this lead to faster growth in productivity?

Answered: 1 week ago