Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a ) Find the values of the following variables, a , b , c , d , and e . For example, your STUDENT ID
a Find the values of the following variables, a b c d and e For example, your STUDENT ID is and therefore, the value of LASTTHREEDIGITOFYOURSTUDENTID is Use your own student ID int a LASTTHREEDIGITOFYOURSTUDENTID ; int b LASTTHREEDIGITOFYOURSTUDENTID ; float c LASTTHREEDIGITOFYOURSTUDENTID ; float d float LASTTHREEDIGITOFYOURSTUDENTID; float e abdc; b Find output from the given code segment for each of the values of choice variable i choice LASTTHREEDIGITOFYOURSTUDENTID ii choice LASTTHREEDIGITOFYOURSTUDENTID iii choice LASTTHREEDIGITOFYOURSTUDENTID a LASTTHREEDIGITOFYOURSTUDENTID; b a ; c a ; printfBEGIN
; if choice a printfUIU
; else if choice b && choice c printfCSE
; else printfNICE
; printfEND; a Show the manual tracing for the following code segment a LASTTWODIGITOFYOURSTUDENTID; b LASTTWODIGITOFYOURSTUDENTID ; c LASTTWODIGITOFYOURSTUDENTID ; printfSTART; switch a b c case : printf
d d d a b c; break; case : printf
d d d a b c; case : printf
d d d a b c; break; United International University UIU Dept. of Computer Science & Engineering CSE Page of default: printf
d d d a b c; printf
STOP; b Write a program to perform the following operations i Assign integer variable a by the LASTTHREEDIGIT OF YOUR STUDENTID; ii Assign integer variable b by the LASTONEDIGIT OF YOUR STUDENTID; iii Increase a by iv Decrease b by v If a is less than b output will be Division not possible vi If a is divisible by b output will be a b quotient of ab vii If a is not divisible by b output will be a b quotient and remainder of ab a Show the manual tracing for the following code segment and find output int n LASTTHREEDIGIT OF YOUR STUDENTID; int i n; int sum ; while i n sum sumi; printf
d d i sum; i; printf
d d i sum; b Write a program that calculates the summation of the following series aaiaiaiai Where a LASTTHREEDIGIT OF YOUR STUDENTID and i LASTONEDIGIT OF YOUR STUDENTID a Show the manual tracing for the following code segment and find output int A; int i; a LASTTWODIGITOFYOURSTUDENTID; b LASTTWODIGITOFYOURSTUDENTID; c LASTTWODIGITOFYOURSTUDENTID; d LASTTWODIGITOFYOURSTUDENTID; Aa; Ab; Ac; Ad; fori; i; i ifAi printfAdd
i Ai; b Write a program to perform the following operations i Declare a onedimensional array A of size ii Store the number aaiaiaiai in the array A Where a LASTTHREEDIGIT OF YOUR STUDENTID and iLASTONEDIGIT OF YOUR STUDENTID iii Print the numbers in array A on the monitor in reverse order.
Step 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