Question: Questioni) (50 p.) Write a C Program to find the Largest Number in a one dimensional array of numbers using recursion function Use pointer notation


Questioni) (50 p.) Write a C Program to find the Largest Number in a one dimensional array of numbers using recursion function Use pointer notation Use a symbolic constant to define an array size (array size=5) Enter element from the keyboard. Expected Output: Entering elements: 712 745 732 78 ? 12 Printing elements: 12 45 32 8 12 The largest number in the array is: 45 Question2) (50 p.) Define a structure for 10 employees containing names, salary and hours of work per day in a company. Write a program to increase the salary depending on the number of hours of work per day as follows and then print the name of all the employees along with their final salaries both on the screen and to a file (employee.txt). Hours of work per day 10 >=12 Increase in salary $55 $110 $140 8 Test Data: (for employees) Enter 10 Employees Details: enter 1. emp name:CEM enter 1. emp salary:3250.50 enter 1. emp hours worked: 11 2 enter 2. emp name:MOHAMMED enter 2. emp salary:4000 enter 2. emp hours worked:20 Expected Output: (for 2 employees) ::Employees Details: Employee1-> CEM 3250.50 Employee2==> MOHAMMED 4000.00 11 20 Employee.txt employee - Notepad File Edit Format View Help Employee1--> Employee2==> MOHAMMED 3250.50 4000.00 11 20 Question3) What will be the output of the following program? Recursive function. Show it step by step #include "stdafx.h" int large(int[], int, int); void main() { int largest; int list [5]={5,8,2,9,7}; int i; printf("Printing the list: "); for (i = 0; i 0) { if (list(position] > largest) { largest .list[position); ) return large(list, position. 1, largest); >
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
