Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Show that the following program running on Pentium prints fff0 f0 fffffff0 f0 ========== Program ================= #include void main() { char c; unsigned char uc;

Show that the following program running on Pentium prints

fff0 f0

fffffff0 f0

========== Program =================

#include

void main() {

char c;

unsigned char uc;

short s1, s2;

unsigned short us1, us2;

c = 0xf0; uc = 0xf0;

us1 = c; us2 = uc;

printf("us1 = %8x,\tus2 = %8x ", us1, us2);

s1 = c; s2 = uc;

printf("us1 = %8x,\tus2 = %8x ", s1, s2);

}

Show the following steps:

Step1 show the values in c and uc

Step2 show the integral promoted values of c and uc

Step3 show the values in us1 and us2

Step4 show the integral promoted values of us1 and us2

(these are the values printed by the first printf statement)

Step5 show the integral promoted values of c and uc

(they are the same as those values in Step2)

Step6 show the values in s1 and s2

Step7 show the integral promoted values of s1 and s2

(these are the values printed by the second printf statement)

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

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

1. Television more Over watching faceing of many problems ?

Answered: 1 week ago

Question

Is there a link between chronic stress and memory function?

Answered: 1 week ago