SlideShare a Scribd company logo
1 of 1
Download to read offline
1.Declare a student structure that contains :
- Student's first and last name
-Student ID
2. Create the following functions:
-getStudentInfo(void)
Declares a single student, uses printf()/scanf() to get input
Returns the single student back
- printStudentInfo(student_t *st_ptr)
Takes the pointer to a student (to avoid making a copy)
-Prints out all of the student information
3. Declare an array of five students
4. Using a for loop and getStudentInfo() function, get input of all the students
5. Using a for loop and printStudentInfo() function, print all the output of all students.
Solution
getStudentInfo(void)
{
printStudentInfo(student_t *st_ptr)
{
str_ptr.getStudentInfo();
display(stud);
return 0;
}
int main()
{
printStudentInfo(str_ptr);
}
return 0;
}

More Related Content

More from mohamednihalshahru

Hello, I need help writing a code in C. It wants to do things with f.pdf
Hello, I need help writing a code in C. It wants to do things with f.pdfHello, I need help writing a code in C. It wants to do things with f.pdf
Hello, I need help writing a code in C. It wants to do things with f.pdf
mohamednihalshahru
 
Do you think that knowing about aggression between groups of chimpan.pdf
Do you think that knowing about aggression between groups of chimpan.pdfDo you think that knowing about aggression between groups of chimpan.pdf
Do you think that knowing about aggression between groups of chimpan.pdf
mohamednihalshahru
 
Diana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdf
Diana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdfDiana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdf
Diana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdf
mohamednihalshahru
 
Create a new java class called ListNode. Implement ListNode as a gen.pdf
Create a new java class called ListNode. Implement ListNode as a gen.pdfCreate a new java class called ListNode. Implement ListNode as a gen.pdf
Create a new java class called ListNode. Implement ListNode as a gen.pdf
mohamednihalshahru
 
Complete the following short answer questions1.  How do the virus.pdf
Complete the following short answer questions1.  How do the virus.pdfComplete the following short answer questions1.  How do the virus.pdf
Complete the following short answer questions1.  How do the virus.pdf
mohamednihalshahru
 
Briefly describe the two competing theories regarding the origin of H.pdf
Briefly describe the two competing theories regarding the origin of H.pdfBriefly describe the two competing theories regarding the origin of H.pdf
Briefly describe the two competing theories regarding the origin of H.pdf
mohamednihalshahru
 
1. Describe how plant vasculature is optimized for water transport i.pdf
1. Describe how plant vasculature is optimized for water transport i.pdf1. Describe how plant vasculature is optimized for water transport i.pdf
1. Describe how plant vasculature is optimized for water transport i.pdf
mohamednihalshahru
 
A19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdf
A19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdfA19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdf
A19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdf
mohamednihalshahru
 

More from mohamednihalshahru (17)

Inhaling and exhaling Label the figure that shows INHALATION and.pdf
Inhaling and exhaling  Label the figure that shows INHALATION and.pdfInhaling and exhaling  Label the figure that shows INHALATION and.pdf
Inhaling and exhaling Label the figure that shows INHALATION and.pdf
 
In accordance to the PLSS land description system, locate the section.pdf
In accordance to the PLSS land description system, locate the section.pdfIn accordance to the PLSS land description system, locate the section.pdf
In accordance to the PLSS land description system, locate the section.pdf
 
How can a topologically associating domain (TAD) mutation effect mor.pdf
How can a topologically associating domain (TAD) mutation effect mor.pdfHow can a topologically associating domain (TAD) mutation effect mor.pdf
How can a topologically associating domain (TAD) mutation effect mor.pdf
 
Hello, I need help writing a code in C. It wants to do things with f.pdf
Hello, I need help writing a code in C. It wants to do things with f.pdfHello, I need help writing a code in C. It wants to do things with f.pdf
Hello, I need help writing a code in C. It wants to do things with f.pdf
 
Fix the following C program in linux. When it is compiled it gives t.pdf
Fix the following C program in linux. When it is compiled it gives t.pdfFix the following C program in linux. When it is compiled it gives t.pdf
Fix the following C program in linux. When it is compiled it gives t.pdf
 
7. Wet ear wax (W) is dominant over dry ear wax (w)W=wet ear wax.pdf
7. Wet ear wax (W) is dominant over dry ear wax (w)W=wet ear wax.pdf7. Wet ear wax (W) is dominant over dry ear wax (w)W=wet ear wax.pdf
7. Wet ear wax (W) is dominant over dry ear wax (w)W=wet ear wax.pdf
 
Examine your opinion on the death penalty. Defend why you are for th.pdf
Examine your opinion on the death penalty. Defend why you are for th.pdfExamine your opinion on the death penalty. Defend why you are for th.pdf
Examine your opinion on the death penalty. Defend why you are for th.pdf
 
Do you think that knowing about aggression between groups of chimpan.pdf
Do you think that knowing about aggression between groups of chimpan.pdfDo you think that knowing about aggression between groups of chimpan.pdf
Do you think that knowing about aggression between groups of chimpan.pdf
 
Diana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdf
Diana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdfDiana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdf
Diana’s Death UnraveledHemophilia causes a lack of blood clotting,.pdf
 
Create a new java class called ListNode. Implement ListNode as a gen.pdf
Create a new java class called ListNode. Implement ListNode as a gen.pdfCreate a new java class called ListNode. Implement ListNode as a gen.pdf
Create a new java class called ListNode. Implement ListNode as a gen.pdf
 
Complete the following short answer questions1.  How do the virus.pdf
Complete the following short answer questions1.  How do the virus.pdfComplete the following short answer questions1.  How do the virus.pdf
Complete the following short answer questions1.  How do the virus.pdf
 
Briefly describe the two competing theories regarding the origin of H.pdf
Briefly describe the two competing theories regarding the origin of H.pdfBriefly describe the two competing theories regarding the origin of H.pdf
Briefly describe the two competing theories regarding the origin of H.pdf
 
Atlas Advertising Atlas Advertising is a regional advertising agency.pdf
Atlas Advertising Atlas Advertising is a regional advertising agency.pdfAtlas Advertising Atlas Advertising is a regional advertising agency.pdf
Atlas Advertising Atlas Advertising is a regional advertising agency.pdf
 
4. Show that Prefix(L)-x for some y, xy E L is regular if L is regul.pdf
4. Show that Prefix(L)-x for some y, xy E L is regular if L is regul.pdf4. Show that Prefix(L)-x for some y, xy E L is regular if L is regul.pdf
4. Show that Prefix(L)-x for some y, xy E L is regular if L is regul.pdf
 
26) Which is a function of an operating system O Browse the Internet.pdf
26) Which is a function of an operating system O Browse the Internet.pdf26) Which is a function of an operating system O Browse the Internet.pdf
26) Which is a function of an operating system O Browse the Internet.pdf
 
1. Describe how plant vasculature is optimized for water transport i.pdf
1. Describe how plant vasculature is optimized for water transport i.pdf1. Describe how plant vasculature is optimized for water transport i.pdf
1. Describe how plant vasculature is optimized for water transport i.pdf
 
A19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdf
A19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdfA19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdf
A19730 Which, ofthe foliowrgconsidered a tusa.a.for restructuring ro.pdf
 

Recently uploaded

Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
Elizabeth Walsh
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 

1.Declare a student structure that contains - Students first an.pdf

  • 1. 1.Declare a student structure that contains : - Student's first and last name -Student ID 2. Create the following functions: -getStudentInfo(void) Declares a single student, uses printf()/scanf() to get input Returns the single student back - printStudentInfo(student_t *st_ptr) Takes the pointer to a student (to avoid making a copy) -Prints out all of the student information 3. Declare an array of five students 4. Using a for loop and getStudentInfo() function, get input of all the students 5. Using a for loop and printStudentInfo() function, print all the output of all students. Solution getStudentInfo(void) { printStudentInfo(student_t *st_ptr) { str_ptr.getStudentInfo(); display(stud); return 0; } int main() { printStudentInfo(str_ptr); } return 0; }