Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1.d how do they get D for int value 68? Suppose x is an integer variabl

ID: 3684000 • Letter: Q

Question

Question 1.d how do they get D for int value 68? Suppose x is an integer variable with the value 68. What is printed by the x is an integer variable with the value 68. What is printed by the C statement? Printf ("%", x);68 Suppose x is an interger variable with the value 68. What us printed by the following C statement? Printf ("%", x); 104 Suppose x is an integer variable with the value 68. What is printed by the following C statement? Printf ("%", x); 44 Suppose x is an integer variable with the value 68. What is printed by the following C statement? Printf ("%c",x), D Suppose y is a double variable with the value 1.523. What is printed by the following C statement? (Show any spaces in the output.) printf C%8'2f", y); 1.52 (with four leading spaces)

Explanation / Answer

In c language character will be treated same as 7 bit intiger

if you type %d it will print its ascii value in decimal

if you typr %o it will print its ascii value in octal

if you print %x it will print itsascii value in hexa decimal

in the same way

if you print %c it will print charecter coressponding to the ascii value

hence since the character corresponding to ascii value 68 is D

printf("%c",x); will print D

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote