i want to solution for all this 7 Questions: Question 1: Implement a C++ program that multiples two numbers using pointers. For testing, do the following: Enter the first integer: 8 Enter the second integer: 11 Expected output: The multiplication of the two integers is: 88 Question 2: Implement a C++ program that uses call by reference (in pointers) to multiply two numbers. For testing, do the following: Enter the first integer: 8 Enter the second integer: 11 Expected output: The multiplication of the two integers is: 88 Question 3: Implement a C++ program that uses call by reference to calculate the factorial of a given integer using pointers. For testing, do the following: Enter an integer: 4 Expected output: The Factorial of 4 is: 24
i want to solution for all this 7 Questions:
Question 1:
Implement a C++ program that multiples two numbers using pointers.
For testing, do the following:
Enter the first integer: 8
Enter the second integer: 11
Expected output:
The multiplication of the two integers is: 88
Question 2:
Implement a C++ program that uses call by reference (in pointers) to multiply two
numbers.
For testing, do the following:
Enter the first integer: 8
Enter the second integer: 11
Expected output:
The multiplication of the two integers is: 88
Question 3:
Implement a C++ program that uses call by reference to calculate the factorial of a
given integer using pointers.
For testing, do the following:
Enter an integer: 4
Expected output:
The Factorial of 4 is: 24
Question 4:
Implement a C++ program that uses pointers to calculate sum of all elements in an
array of integers.
For testing, do the following:
Enter the element # 1: 2
Enter the element # 2: 3
Enter the element # 3: 6
Enter the element # 4: 1
Enter the element # 5: 7
Expected output:
The sum of the array is: 19
Question 5:
Use structure data type to enter the marks of 5 students in
and print the percentage of each student.
That is, build a structure name StudentRecord that has five elements as follows:
• Number
• Name
• Programming_marks
• Algorithms_marks
• Math_marks
Then define an array of this structure, enter the data, and calculate and print the
required.
Question 6:
Write a C++ program that contains a structure specification that includes four
variables: student name (less than 20 characters), homework grades (an array of
four elements; each is out of 100), test grades (an array of three elements; each is
out of 100), final average (the weighted average of the homework grades and test
grades). Call this structure Student.
• Declare an array of three elements named studentlist from Student.
• Enter name, homework marks, test marks, and then calculate the weighted
average for each tuple.
Question 7:
Write a C++ program that contains a structure, named student, that includes three
variables: name (less than 30 characters), roll number (integer type), and date of
birth (structure type; i.e., use nested structure).
• Declare a variable named s from student.
• Enter the s’s name, roll number, and date of birth.
• Dispaly the s’s name, roll number, and date of birth
Step by step
Solved in 4 steps with 3 images