Answered step by step
Verified Expert Solution
Question
1 Approved Answer
what are the answers for these programming questions 1) Assume that variable Y is double, while all the following variables are integers: a = 5,
what are the answers for these programming questions
1) Assume that variable Y is double, while all the following variables are integers: a = 5, b = 12, c=37, d = 54 . Find the value of Y after cxccute the following linc: Y=d%a" c+a%b+a+ a/3 result = 4 *37 + 5 + 5+1= 148 + 11 = 159.0 2) What will be the output of the following code fragment? printf("%f ":((int) (23.145592*1000))/1000.0) 3) What is the final value of r after performing the following operations? int x = 24 double y = 4 double z = 166 y = x / z x = 6.5 * y 21/14 4. If the variables X. y, and z are 544, 302.536, and -12.32, respecta following linc. (For clarity, a I denotes a blank spacc.) III1302.5415441-12.320 Solution: printf("810.2f84d98.3f", x, y, z): 5 Which of the following expression will yield 0.2? 1. (double) (1/5) B. 1/5 C.1.0/5 DI/5.0 E. (double) 1/5 14. CDEStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started