Question: SET A Assignment 2 1 . Write a C program that involves finding and summing the odd numbers in an array. Declare an array of
SET A
Assignment
Write a C program that involves finding and summing the odd numbers in an array. Declare an array of integers and create a function, sumOddNumbers, to iterate through the array, identify odd numbers, and calculate their sum. The main function should then print the original array and the sum of the odd numbers.
Original array :
Sum of odd numbers:
Original array :
Sum of odd numbers:
Let A and B are two unsorted arrays. Write a program to find the median of the elements of the arrays
A file contains n student records. Each record contains Student Name, Number and Marks of three Subjects. Write a C program to read each record and find the result, average and total. If the student has passed, the record is to be written into a file Passed and if student has failed write the record into another file named Failed
A data base contains lot of multiple invoice bills. The information that are available in the invoice bill is Customer Name, Customer Id Data of Purchasing, Amount of Purchasing and bill number. Write a C program to display the detail of a bill in the prescribed format if the bill number is given as the input using the random accessing method
Note: Database is maintained in the form of files
Take the price and quantity of items as an input. Write a C program to calculate the sum of the prices. Write another C function to calculate the discount according to the following rules: For total less than Rs discount is For total greater than Rs but less than Rs discount is For total greater than Rs discount is Write another function to print the individual item prices, total, discount and the final price.
Example: If the prices are as follows:
Item :
Item :
Item :
Item :
Item :
And the quantities are:
Item :
Item :
Item :
Item :
Item :
Then you should print:
Item Price Quantity Subtotal
Item
Item
Item
Item
Item
TOTAL Discount GRAND TOTAL
Write a C program to create a structure box with required dimensions.Create two boxes with different dimensions and write the box data to a file named Box Read the data from the Box file, calculate the volume of the box, and write the data to a file called BoxData
Write a C program to create a structure called person with name, emailid and age.Write the person data in a file called PersonWrite all the persons data whose age is greater than to a file named SeniorCitizens Write all the other persons details in a file called Citizen
Write a C program that takes a string as input from the user. Write all the alphabets into a file alphabets, special characters in a file special and digits in a file digits. Read the contents of the files and display them in a neat format.
Write a program to take the following strings in two dimensional array and print them in sorting order and take any name and find whether the name exists in the array or not.
Strings: HARITHA"CHANDANA","JYOTHI","HARIKA";
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
