vu mth718 Mid Term Subjective Solved Past Paper No.4

vu mth718 Topics in Numerical Methods Solved Past Papers

Solved Past Papers

This subjective solved past paper is related to book/course code vu mth718 Topics in Numerical Methods which belongs to vu organization. We have 17 past papers available related to the book/course Topics in Numerical Methods. This past paper has a total of 10 subjective questions belongs to topic Mid Term to get prepared. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to get prepared for exams by learning subjective questions online on NVAEducatio.

NVAEducation also facilitates users to download these solved past papers with an affordable prices. However, users are not enforced to pay for money, rather they can use credits to buy such stuff on NVAEducation. Users can earn credits for doing some little tasks and then you will be able to use that credits to buy solved past papers on NVAEducation.

Question 1: What is difference between Unary and binary operators and how they can be overloaded?
Answer:
Unary operator takes one argument. a++ is an example of unary operator
Binary take two operators +,-,* are example of binary operators
Overloaded binary operator may return any type
Here is general syntax of overloading
Return-type operator symbol (parameters);
Operator is keyword
Page. No. 10/15
Question 3: Write a function BatsmanAvg which calculate the average of a player (Batsman), Call this function in main program (Function). Take the input of Total Runs made and Total number of matches played from the user in main function
Answer:
#include <iostream.h> // allows program to output data to the screen
// function main begins program execution
int BatsmanAvg(int TotalRuns, int TotalMatches) ;
main() {
int stopit;
int TotalRuns, TotalMatchesPlayed =0;
cout << "Please Entere the total Runs made : " ;
cin>> TotalRuns ;
cout << "Please Entere the total match played : " ;
cin>> TotalMatchesPlayed ;
cout << " Avg Runs = " << BatsmanAvg(TotalRuns,TotalMatchesPlayed);
cin>> stopit; //pause screen to show output
}
int BatsmanAvg(int TotalRuns, int TotalMatches) {
return TotalRuns/TotalMatches;
}
Question 10: Write a program which defines three variables of type double which store three different values including decimal points, using setprecision manipulators to print all these values with different number of digits after the decimal number.
Answer:
#include
#include
main () {
double a = 12.12345;
double b = 13.123456;
double c = 14.1234567;
cout << setprecision (5) << a << endl;
cout << setprecision (2) << a << endl;
cout << setprecision (3) << a << endl;
}

Solved Past Papers of mth718 Topics in Numerical Methods

Other mth related subjective solved past papers

Other categories of vu Solved Past Papers

Other organizations

Theme Customizer

Gaussian Texture



Gradient Background