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

Exarn1 Part2 docx Saved to this PC A Rachel Benson D - File Home nsert Design La

ID: 3909608 • Letter: E

Question

Exarn1 Part2 docx Saved to this PC A Rachel Benson D - File Home nsert Design Layout References Mailings Review Vie HelpTell me what you want to do Share , cut Find AaBbCcDReplace Heading 1 Heading 2 Ti ublitle Subtle m... EmphassnteStrong Select Editing E Copy Paste Format Psinle Clipboard Paragraph Styles .Below, you'll be asked to modify, save, and submit this Word file to D2L dropbox E1Part2 .For Problem 5, copy your code to this ile. Also have a file named eexx11.c in your account 1) What is the output prints to screen) of the following code fragment (6 pts) Program Output int k = 3; 2) What is the output of this code fragment (6 pts) Pr an Output / input i11 be 7 nt nun: Fage 1 Dt3 334words 9:35 PM 14-6/26/2018

Explanation / Answer

Output

Explanation

// setting k to 3

int k = 3;

printf("%d %d ", k, k); // printing 3 3

printf("%d", k); // printing 3

k = k + 1; // increasing k by 1. Now k= 4

printf(" ");

k = 5; // setting k to 5 and printing

printf("%d ", k);

Output

Explanation

int num, res;

scanf("%d",&num);

// num and res are 7

res = num;

// printing 7 twice

printf("%d", res);

printf("%d", res);

// 7 + 2 = 9 = res

res = num + 2;

// printing 9 twice

printf("%d", res);

printf("%d", res);

printf(" ");

// 9 + 2 = 11 and printing it twice

res = res + 2;

num = num - 2;

printf("%d", res);

printf("%d", res);

Output

       3 3  3    5

Explanation

// setting k to 3

int k = 3;

printf("%d %d ", k, k); // printing 3 3

printf("%d", k); // printing 3

k = k + 1; // increasing k by 1. Now k= 4

printf(" ");

k = 5; // setting k to 5 and printing

printf("%d ", k);

Output

  7799  1111 

Explanation

int num, res;

scanf("%d",&num);

// num and res are 7

res = num;

// printing 7 twice

printf("%d", res);

printf("%d", res);

// 7 + 2 = 9 = res

res = num + 2;

// printing 9 twice

printf("%d", res);

printf("%d", res);

printf(" ");

// 9 + 2 = 11 and printing it twice

res = res + 2;

num = num - 2;

printf("%d", res);

printf("%d", res);

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