Question 3.9 (b) 28 (d) 14 (a) 7 e) None 3.6 -01 ba -0) 2213 What will be the va
ID: 3756181 • Letter: Q
Question
Question 3.9
(b) 28 (d) 14 (a) 7 e) None 3.6 -01 ba -0) 2213 What will be the value of b and why 1, what will be value of b? 0 is replaced by a - 1, what will be value of b? 1.7 In Freq asked ques. 3.6, if first statement a 0 is replaced by a 18 In Freg asked ques. 3,6, if second statement a 3,9 What will happen to following code: main int age float ht printt ("enter her age, ht") scant ("d td", kage,&ht) in printt ("she loven you") else printt "ahe loves you") (o) Syntax error in scanf statement fo) output dependent on input values (b) Run Time error in scanf statement (d) she loves you 3,10 main) ( Int x 128 (a) 128 (b) 129 3.11 Find the output for the following C program (c) 130 (d) 1 (e) 2 (a) A points to max of x and y b) f points to min of x and y (c) errorExplanation / Answer
In scanf statement Since the scanf is reading integer in the second place too, and since ht is of type float, It will not be able to link the input to floating point number, thus throwing runtime error (Option b). To rectify the error the scanf statement should be as follows:
scanf("%d %f", &age, &ht);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.