Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ mulptiple choice questions for study guide that I can\'t figure out. Please

ID: 3920276 • Letter: C

Question

C++ mulptiple choice questions for study guide that I can't figure out. Please help

Help would be greatly appreciated

Question 25 1 pts Consider the following function declaration: float calc taxffloat, float: Which of the following is TRUE? Question 29 1 pts this function accepts an array as an argument this function accepts a simple variable as an arument this function retums a float all of the above are true Which of these header files must you include if you want to copy a c-style string into another (empty) c-style string? a. string O b. cstring O c. both a and b O d. none of the above Question 26 1 pts Which of these data types can be put into an array? a. int Question 30 1 pts O b, char You are writing a program during the execution of which a user will type in his or her full name (hrst and last separated by a space). The name will then be placed in a Standard C++ string. Which of these lines of code will work best? Assume that "name" is name of the string. C. Student objects d. all of the abowe O cin.getiname, 80 Question 27 1 pts O cin >name; getline(cin, name An array of characters amounts to a O all of the ahove will wark equally well a. c string b. Standard C++ string c. a or b

Explanation / Answer

Question 25

Answer: all of the above are true

Explanation

float is returned

float and array of floats are arguments

Question 26

Answer: d. all of the above

Explanation

int, char, Student objects -- We can create arrays with any of the data types.

Question 27

Answer: a. c-string

Explanation

Standar C++ string has the data type "string"

Question 29

Answer: a. string

Explanation

Because it is in string library

Question 30

Answer: getline(cin, name);

Explanation

#include <iostream>

using namespace std;

int main() {

string name;

getline(cin, name);

cout << name;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote