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

Question 14: What will be the output of the program? int mainl leta(4) ?10. 12,

ID: 3917182 • Letter: Q

Question

Question 14: What will be the output of the program? int mainl leta(4) ?10. 12, 14, 1612 A. 10 B. 14 ?. 16 Question 15: What will be the output of the program? includecatdio.h> int maino int i-3 - printf ("1d ". i retarn Question 16: What will be the output of the program? printti"td".r.d1)a return B. 6 Question 17: What will be the output of the program? int morlemi default:printfl braak case 4: printt "2-)2 break case : print break case g: printf ("4"), break? ) C. 1 B. 2 A. 4 void main if (x D. 3 Qustions 1S: What waill be the output of the program? B. 5,0 C.6.1 D. 6.2 Question 19: What will be the output of the program ineludecatdio.h int main int af41-11,2,3,.4 int e -P printf("id" . c)? return Oz , B. 0 C. 2 D. 1 Question 20: What will be the output of the program? include int main0 int b(31(2) 1, 21, 13. 4 15, 61) printt"d",b(01(3) return 0:) A. 4 B. 1 c. 2 Part II: Fill- in-The Blank Questions (6 points) Question 21: What will be the output of the program? include

Explanation / Answer

14. (d)12 *a points to first element *a+2 = 10+2 = 12

15. (a)12 i=3 i++ will first have i value equal to 3 and then increment it to 4 i*i++ = 4*3 = 12

16. (b)6 p->d1 points to 5 p->d1++ will make it 6

17. (c)1 movie>>1+movie thus, movie value will be shifted (1+movie) i.e. 5 times i.e 4>>5 which is 0. Thud default value will be printed.

18. (d)6,2 if(x++) is true if statement is executed x becomes 6 print(x++,++y) x will be printed first i.e 6 and then will be incremented. ++y will make y increment first and thus y=2 and thus get printed.

19. (a)3 p will point to first element, q contain address of last element of a. q-p will make pointer subtraction and thus difference will be say starting address of a is 1000 and integer take 2 bytes thus, last element address is 1006. thus q-p = (1006-1000)/2 = 3

20. (a)4 element of 2d are stored as 1 dim array and thus a[0][3] points to 4th element i.e 4

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