Question: Question 11 pts Given an array named scores with 25 elements, what is the correct way to access the 25th element? scores+25 scores[24] scores[25] scores[last]
Question 11 pts
Given an array named scores with 25 elements, what is the correct way to access the 25th element?
| scores+25 |
| scores[24] |
| scores[25] |
| scores[last] |
Flag this Question
Question 21 pts
Which boolean operation is described by the following table?
| A | B | Operation |
| True | True | True |
| True | False | False |
| False | True | False |
| False | False | False |
| or || |
| and && |
| not ! |
| none of the above |
Flag this Question
Question 31 pts
Which boolean operation is described by the following table?
| A | B | Operation |
| True | True | True |
| True | False | True |
| False | True | True |
| False | False | False |
| or || |
| and && |
| not ! |
| none of the above |
Flag this Question
Question 41 pts
Which loop structure always executes at least once?
| do-while |
| for |
| while |
| sentinel |
Flag this Question
Question 51 pts
When is the external name of the file used in the program?
| Any time you read or write to the file |
| Never |
| Only when reading from the file |
| When opening the file stream |
Flag this Question
Question 61 pts
Which of the following symbols has the highest precedence?
| ++ |
| || |
| && |
| - |
Flag this Question
Question 71 pts
Which include directive is necessary for C++ file input and output?
| #include |
| #include |
| #include |
| #include |
Flag this Question
Question 81 pts
Which function returns true if the character argument is a letter?
| isdigit |
| islower |
| isalpha |
| isspace |
Flag this Question
Question 91 pts
Which of the following are NOT legal function declarations?
| int ave3(int a, int b, int c); |
| int 3ave(int a, int b, intc); |
| int ave3(int, int, int); |
| int ave_3(int a1, int a2, int a3); |
Flag this Question
Question 101 pts
Multiple arguments to a function are separated by
| comments |
| semicolons |
| colons |
| commas |
| periods |
Flag this Question
Question 111 pts
Which statement correctly opens an input stream named in_file and attaches it to a file name project.txt?
| in_file=project.txt |
| in_file="project.txt" |
| in_file.open("project.txt"); |
| in_file.open(project.txt); |
Flag this Question
Question 121 pts
If a file did not open correctly, you should
| continue on anyway |
| display an error message and continue on |
| display an error message and take some suitable action such as exit |
| exit the program immediately |
Flag this Question
Question 131 pts
Testing your program should be done
| As each function is developed |
| At the end of the coding |
| Only if there appear to be problems |
| Only if your instructor requires it. |
Flag this Question
Question 141 pts
If you declare and initialize an integer array of size 10, but only list 5 values, what values are stored in the remaining 5 indexed variables?
| 0 |
| garbage |
| 0.0 |
| '0' |
Flag this Question
Question 151 pts
Which of the following is a valid identifier?
| 3com |
| three_com |
| 3_com |
| 3-com |
| dollar$ |
Flag this Question
Question 161 pts
What are the valid indexes for the array shown below? int myArray[25];
| 0-25 |
| 0-24 |
| 1-25 |
| 1-24 |
Flag this Question
Question 171 pts
What is the value of x after the following statements? int x, y, z; y = 10; z = 3; x = y * z + 3;
| Garbage |
| 60 |
| 30 |
| 33 |
Flag this Question
Question 181 pts
What is the correct way to write the math condition y < x < z
| (y < x < z) |
| ( (y < x) && z) |
| ((y > x) || (y < z)) |
| ((y < x) && (x < z)) |
Flag this Question
Question 191 pts
A function may return more than one item
| True |
| False |
Flag this Question
Question 201 pts
Functions can return at most one value.
| True |
| False |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
