Question & Answer: A.. Write a code to define a structure named student, which includes name, student number and email address…..

A.. Write a code to define a structure named student, which includes name, student number and email address

B. Write a code to define a linked list node using the above defined structure student (i.e. the data of the node is a student structure).

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: A.. Write a code to define a structure named student, which includes name, student number and email address…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

C. Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you ask the user to input a non-negative integer number. Then call the function factorialand display the result.

Expert Answer

 

A. Structures Student :

typedef struct student{
string name, email;
int studentNumber;
} student;

B. LinkedList node

typedef struct Node{
student s;
Node *next;
} Node;

C. C++ program :

#include <iostream>

using namespace std;

int factorial(int x){
if(x==1){
return 1;
}
return x*factorial(x-1);
}
int main()
{
printf(“Fact is %dn”,factorial(5));

return 0;
}

OUTPUT :

Question & Answer: A.. Write a code to define a structure named student, which includes name, student number and email address..... 1

Still stressed from student homework?
Get quality assistance from academic writers!