Question: a ) Rewrite the following code after correcting the errors. #include #include int Main ( ) { Float n _ , m = 5 ;
a Rewrite the following code after correcting the errors. #include #include int Main Float n m ; scanfd n float p nmsqrt; printfd P; b Identify the invalid variable names from the following. Mention the reasons that make them invalid. Numtime, $VALUE, myValue num firstname, lastname, fx c Compute the values of the variables a b c and d int a ; float b int; int c && ; float d ; a Find the outputs when the input values of variable b are and respectively. int b; scanfd &b; printfBegin
; if b printfUIU
; else ifb printfCSE
; else if bb printfCOMPUTER
; else if b&&b printfNICE
; else printfBye
; printfEnd; b In a factory there are three categories of employees: X Y Z The manager announced a bonus for the employees who have years or more work experience and more than family members, OR Less than BDT total family income per month He is also generous to his bonus deprived employees who have a larger family. Thus, He has declared the bonus for For the employees of Y and Z categories who have more than family members and has less than BDT total family income per month. However, if an employee is from X category, he can avail the bonus having more than family members. Now you need to automate the system by writing a program to take following inputs from user employee and notify him whether he is eligible for the bonus or not. Category character Years of work experience integer Number of family members integer Total family income per month float United International University UIU Dept. of Computer Science & Engineering CSE Page of a Manually trace show the values of all the variables in each step the following code segment. int n sum i a sign ; fori ; in; i sum sum asign; ifi a a ; else a a ; sign sign; printf
d sum; b Write a program to determine whether a number is a deficient number or not. A number is deficient if the summation of its factors is less than double of the number. For example, is a deficient number as the sum of its factors is less than double of On the other hand, is not a deficient number. Because the sum of the factors of is which is larger than double of a Show the manual tracing show the values of all the variables and array elements in each step for the following code segment int F; int i; F; F; fori; i; i FiFiFi; printfd d d
Fi Fi Fi; printfd d d Fi Fi FiFi; b Write a Program that will take n integer numbers into an array, and then find the maximum minimum among them with the index positions. Sample input Sample output Max: Index: Min: Index: Max: Index: Min: Index: a Draw a flowchart that always displays the following menu. It also takes a choice from the user and handle according to the menu. Enter to display SPL is fun! Enter to display On campus University life is the Best! Enter q to quit. b Write a C program that takes an integer value n and draw the pattern below. Sample input, n Sample output x x x x x x x x x x x x x x solve it c language
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
