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...
(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...
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...
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...
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.
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...
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...
I didn't answer for the prevuise question A program takes time proportional to the log of...
I didn't answer for the prevuise question A program takes time proportional to the log of the input size. If the program takes 100ms for input size 1,000, how many milliseconds does it take for input size 1,000,000? A program takes time proportional to the square root of the input size. If the program takes 100 ms for input size 500, how many milliseconds does it take for input size 2,000? A program takes time proportional to the cube of...
Please make the following changes to the following code: #This program takes in the first and...
Please make the following changes to the following code: #This program takes in the first and last name and creates a userID printing first letter of first name and first 7 characters of last name #by Abi Santo #9/20/20 def main(): print("This Program takes your first and last name and makes a User ID") f_name = str(input("Please enter your first name ")).lower() l_name = str(input("Enter your last name: ")).lower() userID = str(f_name[:1]+str(l_name[:7])) print(userID) main() Call the function createUserName(). This function...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT