Answer:
d)anotherFunc(myints);
Explanation:
When we call a function we just have to pass the names of the arguments to the function.In case of arrays we also just have to pass the name of the array.We don't have to worry about the square brackets.So the function call will be like this.
anotherFunc(myints);
Hence the answer is option d.
To accustom to several different language-speaking countries. One program is often used internationally so having a language setup is very important.
Yes, they are.
Mostly dentists' offices, though.
Answer:
Apple, Samsung and Foxconn
Explanation:
They are the leading it companies today
Answer:
#include <iostream>
#include <vector>
using namespace std;
void calGPA();
vector<int> g;
vector<int> h;
int main(){
char pushMore = 'y';
int fg, fh;
for (;;){
if (pushMore == 'n'){
break;
} else{
cout<< "Enter integer for grade: ";
cin>> fg;
cout<< "Enter integer for credit hours: ";
cin>> fh;
g.push_back(fg);
h.push_back(fh);
cout<< "Do you want to add more grade and credit hours? y/n: ";
cin>> pushMore;
}
}
calGPA();
}
void calGPA(){
double total = 0, GPA;
for (int i = 0; i < g.size(); ++i) {
total += g.at(i) * h.at(i) ;
}
cout<< "The GPA is : "<< total/g.size();
}
Explanation:
The C++ source code above defines two vectors 'g' and 'h'. The latter holds the grades of a student while the former holds the credit hours for the subject taken. The void 'calGPA' function calculates and prints the student's GPA.