// Correct Code consists function header and calling statement.
#include<iostream>
using namespace std;
void approveFunds(string courseP, string nameP,string
&dateP,float costP,bool &approvedP)
{}
int main()
{
string name,course,date;
float cost;
bool approved;
approveFunds("Memory enhancement","Ellen Subisa",
date,595.00,approved);
return 0;
}
Answer:-
Option 1. void approveFunds(string courseP, string nameP,string &dateP,float costP,bool &approvedP)
Suppose the following declarations appear in the mainfunction of a C++ program: string name, course, date;...
QUESTION 3 2 marks Suppose the following declarations appear in the nai nfunction of a C++ program: string nane, course, date; float cost; bool approved; Suppose the following calling statement appears in the nai nfunction: approveFunds("Menory enhancement", "Ell en Subi sa", date, 595.00, approved): Which of the options below is a correct function header of the function approveFunds in the main function? 1. void approveFunds(string coursep, string namep, string & dat ep, float cost P, bool & approved) 2. void...
Suppose the following declarations appear in the mainfunction of a C++ program: string name, qualification; char sex; int age, yearsExperience; If the following function header is given: void findCandidate (char sex, int & agep, string & name, int yearsExperience, string qualification) which of the options below is a correct calling statement of the function findCandidate in the main function? 1. findCandidate('m', 30, nameP, 7, "B. Curr"); 2. findCandidate (sex, age, name, yearsExperience, qualification); 3. findCandidate ('m', 30, name, 7, qualification);...
2 COS1511 MAY/JUNE2020 SECTION A 20 MARKS Choose one option for every question. If, for example you choose option 2 as the correct answer for Question 1, and option 4 as the correct answer for Question 2, please answer as follows: 1. 2 2.4 etc. QUESTION 1 2 marks Suppose the following declarations appear in the nai nfunction of a C++ program: string nane, course; char sex; int age; float cost; bool approved; If the following function header is given:...
Suppose your program has the following declarations to represent information about a student: string major // possibly empty float gpa ; bool female//true if female false if male Write C++ logical conditions corresponding to each of the following sets. Your answers should be as compact as possible and cover all cases. Male students, whose major starts with the letter 'e' (economics, english, etc), and whose GPA is 2.0 or lower All students, whose major ends in the letter 's' (mathematics,...
Part1. Write a C program contains the following declarations: char customer_name[N_CUSTOMERS][MAX_NAME_LENGTH]; int customer_number[N_CUSTOMERS] A program uses a text file that contains the following data on each line: The customer number is an int, and the first and last names are alphabetic strings that contain no whitespace. The last and first names themselves are however separated by whitespace. Write a C function with the following prototype: void read_customer (char name[][MAX_NAME_LENGTH], int number[], int position, FILE *cust_file) Your function should read a...
Instructions: Consider the following C++ program. At the top you can see the interface for the Student class. Below this is the implementation of the Student class methods. Finally, we have a very small main program. #include <string> #include <fstream> #include <iostream> using namespace std; class Student { public: Student(); Student(const Student & student); ~Student(); void Set(const int uaid, const string name, const float gpa); void Get(int & uaid, string & name, float & gpa) const; void Print() const; void...
Suppose your program has the following function: void jellyo { static string s = ""; S += "a"; cout < s < endl; In the main function, your code calls the jelly function a total of 6 times. What is the output from the last function call?
/* C++ program that prompts the user to enter the name of the student, enter the five scores values. Then calculate the total scores of the student. Then finally calculate the average score of the total score value. Then, print the name, total score , average scrore value on console output. */ //main.cpp //include header files #include<iostream> #include<string> #include<iomanip> using namespace std; //start of main function int main() { //declare variable to read string value string studentName; ...
previous assignment code /*C++ test program to test the classes, Animal, Mammal and Cat and print the results on console window.*/ //Main.cpp //include header files #include<iostream> //include Animal, Mammal and Cat header files #include "Animal.h" #include "Mammal.h" #include "Cat.h" using namespace std; int main() { //create Animal object Animal animal("Dog","Mammal",4); cout<<"Animal object details"<<endl; cout<<"Name: "<<animal.getName()<<endl; cout<<"Type: "<<animal.getType()<<endl; cout<<"# of Legs: "<<animal.getLegs()<<endl; cout<<endl<<endl; //create Cat object Cat cat("byssinian cat","carnivorous mammal",4,"short...
C++ assignment help! The instructions are below, i included the main driver, i just need help with calling the functions in the main function This assignment will access your skills using C++ strings and dynamic arrays. After completing this assignment you will be able to do the following: (1) allocate memory dynamically, (2) implement a default constructor, (3) insert and remove an item from an unsorted dynamic array of strings, (4) use the string class member functions, (5) implement a...