$24
Write a simple program to enter some information from the user and display it using structures. Create a struct named record to store the roll no, first name, last name, faculty, address and contact number of the user. Then use it to scan and print the elements. The output should look like this:
Roll No.:100
First Name:K.N
Last Name:King
Faculty:CS
Address:Lubbock
Contact No.:12345678
*********************
Roll No.: 100
First Name: K.N
Last Name: King
Faculty: CS
Address: Lubbock
Contact No.: 12345678
The annual examination is conducted for 50 students for three subjects. Write a program to read the data and determine the following using structure:
Total marks obtained by each student.
The highest marks in each subject and the Roll No. of the student who secured it.
The student who obtained the highest total marks.
The screenshot of the output is given below.
Enter how many students: 2 Enter name and roll number for student 0 : David 1 Enter name and roll number for student 1 : Mark 2 Enter marks of student 0 for subject 0 : 67 Enter marks of student 0 for subject 1 : 23 Enter marks of student 0 for subject 2 : 56 Enter marks of student 1 for subject 0 : 78 Enter marks of student 1 for subject 1 : 12 Enter marks of student 1 for subject 2 : 45
Total marks obtained by student David are 146 Total marks obtained by student Mark are 135
Student Mark got maximum marks = 78 in Subject : 0 Student David got maximum marks = 23 in Subject : 1 Student David got maximum marks = 56 in Subject : 2
David obtained the total highest marks.
Write a program that takes two complex numbers as structures and adds them with the use of functions.
For 1st complex number
Enter real and imaginary part respectively:
2.3
4.5
For 2nd complex number
Enter real and imaginary part respectively:
6.7
8.9
Sum = 9.0 + 13.4i
Write pseudocode to solve the given problems.
Write C program to solve the above problems. Name your file Lab10_YourName.c