Question

In: Electrical Engineering

Question 6: Recommend/ Explain a program that takes the information of 40 students in following order...

Question 6: Recommend/ Explain a program that takes the information of 40 students in following order
Name:

Father Name:

Enrollment number:

Date of birth:

After taking the information of the students, it then displays the entered information.

Solutions

Expert Solution

Code in C Language (using structures)   :  

#include <stdio.h>
struct student {
char Stud_Name[20];
char Father_Name[20];
int Enroll_num;
char DOB[20];
} s[40];

int main() {
int i;
printf("Enter information of students:\n");

// storing information
for (i = 0; i < 40; ++i) {
printf("Record number - %d",i+1);
printf("\nEnter Student Name: ");
scanf("%s", s[i].Stud_Name);
printf("Enter Father Name : ");
scanf("%s", s[i].Father_Name);
printf("Enter Enrollment Number :");
scanf("%d", &s[i].Enroll_num);
printf("Enter DOB(example:04-06-1999) : ");
scanf("%s", s[i].DOB);
printf("\n");
}
printf("Displaying Information:\n\n");

// displaying information
for (i = 0; i < 40; ++i) {
printf("Record number - %d",i+1);
printf("\nStudent Name: ");
puts(s[i].Stud_Name);
printf("Father Name :");
puts(s[i].Father_Name);
printf("Enrollment Number :");
printf("%d",s[i].Enroll_num);
printf("\nDate of birth :");
puts(s[i].DOB);
printf("\n");
}
return 0;
}


Related Solutions

Question 2 Case study on MIS :information system in restaurant. a waiter takes an order at...
Question 2 Case study on MIS :information system in restaurant. a waiter takes an order at a table ,and then enters it online via one of the six terminals located in the restaurant dinning room .the order is routed to a printer in the appropriate preparations area : the cold item printer if it is a salad, the hot -item printer if it is a hot sandwich or the bar printer if it is a drink. A customer's meal check-listing...
Following information use in Question NO.6 The following is the information about assets and liabilities of...
Following information use in Question NO.6 The following is the information about assets and liabilities of M/s. Hanish LLC and its partners A, B and C. They are sharing profits 9:6:3 with total capital of OMR 169,000 as on 31.3.2020. Particular OMR Particular OMR Cash             58,500 Bank Loan          52,000 Sundry Debtors             91,000 Bonds          65,000 Stock             32,500 Bills Payable        104,000 Machinery             52,000 Sundry Creditors        130,000 Land             91,000 Bank Overdraft          32,500 Furniture...
Use C to Write a program that takes the array reverse_me and reverses the order of...
Use C to Write a program that takes the array reverse_me and reverses the order of the elements (i.e., the first element and the last element are swapped, the second element and the second-to-last element are swapped, etc.). Store the reversed array in reversed_arr. Finally, print out the reversed array as a string.
(JAVA) Create a program that takes in 15 numbers in sorted order from the console and...
(JAVA) Create a program that takes in 15 numbers in sorted order from the console and stores them in a 1D array of size 15. Next, prompt the user for a number to search for in the array (target). Then, print the array. Next, search the array using a linear search – printing out each of the indices (or “indexes”) that are being examined until the algorithm either finds the target or doesn’t. Then, do the same thing for a...
40) In order to be successful, a T&D program needs ________. A) specialization and standardization B)...
40) In order to be successful, a T&D program needs ________. A) specialization and standardization B) top management support C) pre-recorded lectures D) input from local colleges and universities 42) Employees view career development opportunities as more important than ________. A) indirect financial compensation B) employee benefits C) pay D) work-life balance 43) As managers reach higher levels in the organization, it is not so much their ________ skills that that they need, but their ________ skills and their business...
write a program ordered.java Order check Write a program Ordered.java that takes four int command-line arguments...
write a program ordered.java Order check Write a program Ordered.java that takes four int command-line arguments w, x, y, and z. Define a boolean variable whose value is true if the four values are either in strictly ascending order (w < x < y < z) or strictly descending order (w > x > y > z), and false otherwise. Then, display the boolean variable value. NOTE 1: Do not use if statements on this program. NOTE 2: Assume that...
Recommend/ Explain a program which uses an array of 20 integers whose input is taken by...
Recommend/ Explain a program which uses an array of 20 integers whose input is taken by user, the array is passed to a functions named i.e. smallest(int A[20) and largest(int B[20]) to determine minimum and maximum values respectively. Also create a function named modify(int *p) which modifies the value at the index given by user.
Question 6 (11 marks) (Note this question is from the Week 12 Tutorial) The following information...
Question 6 (Note this question is from the Week 12 Tutorial) The following information relates to Moon Light Ltd. (a) At the beginning of the accounting period the company has a salary payable liability of $200 and at the reporting date a salary payable of $360. During the year the salary expense shown in the income statement was $400. (b) At the beginning of the accounting period the company has property, plant and equipment (PPE) with a carrying amount of...
Create a program in Java for storing the personal information of students and teachers of a...
Create a program in Java for storing the personal information of students and teachers of a school in a .csv (comma-separated values) file. The program gets the personal information of individuals from the console and must store it in different rows of the output .csv file. Input Format User enters personal information of n students and teachers using the console in the following format: n Position1 Name1 StudentID1 TeacherID1 Phone1 Position2 Name2 StudentID2 TeacherID2 Phone2 Position3 Name3 StudentID3 TeacherID3 Phone3...
This phyton program takes in three integer parameters and displays them in ascending order. You can...
This phyton program takes in three integer parameters and displays them in ascending order. You can assume that the numbers entered are integers. You CAN'T use lists, min(), max(), or the sort utility. The point is to use if tests. sortThreeIntegers( 39, 2, 5 ) should display: The numbers in order are: 2 5 39 sortThreeIntegers( 14, -12, -1000 ) should display: The numbers in order are: -1000 -12 14 def sortThreeIntegers( x, y, z ): < your code goes...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT