CIS285 C++ PROGRAMMING 1. Which of the following correctly declares an array? A.
ID: 674939 • Letter: C
Question
CIS285 C++ PROGRAMMING
1. Which of the following correctly declares an array?
A. int anarray[10];
B. int anarray;
C. anarray{10};
D. array anarray[10];
2. What is the index number of the last element of an array with 29 elements?
A. 29
B. 28
C. 0
D. Programmer-defined
3- All programs can be written in terms of three types of control structures:
…………………, …………….. and ………………
4- Repeating a set of instructions a specific number of times is called
……………...
5- A function is invoked within a ……………..
6- The ………… statement is used to make decisions
7. What is a comment in c++?
a) comments are parts of the source code disregarded by the compiler
b) comments are executed by compiler to find the meaning of the comment
c) comments are executable
d) none of the mentioned
8. What type of comments does C++ support?
a) single line
b) multi line
c) single line and multi line
d) none of the mentioned
9. Where does the execution of the program starts?
a) user-defined function
b) main function
c) void function
d) none of the mentioned
10. Which is more effective while calling the functions?
a) call by value
b) call by reference
c) call by pointer
d) none of the mentioned
Explanation / Answer
int anarray[10];
28
iterative,sequential,conditional
looping
function
if
comments are parts of the source code disregarded by the compiler
single and multi line
main function
call by reference