DO WHAT YOU CAN DO FOR NOW , YOU CAN OTHER QUESTIONS LATER . IT\'S DUE IN 2 WEEK
ID: 3650956 • Letter: D
Question
DO WHAT YOU CAN DO FOR NOW , YOU CAN OTHER QUESTIONS LATER . IT'S DUE IN 2 WEEKS FROM TOMORROW WORTH 100POINT.PSS: IF YOU DON'T KNOW HOW TO DO IT PLEASE LEAVE IT BLANK PSS:IF YOU ARE MR "IT'S ME" AGAIN PLEASE LET ME KNOW"1.
A function that is called or summoned into action by its reference in another function is a ____.
A) function prototype
B) called function
C) calling function
D) function declarator
2.
The items enclosed within the parentheses in a function call statement are called ____ of the function.
A) parameters
B) formal parameters
C) arguments
D) formal arguments
3.
When a function simply receives copies of the values of the arguments and must determine where to store these values before it does anything else, this is known as a ____.
A) pass by value
B) pass by reference
C) stub
D) function declarator
4.
___ is an example of a function prototype.
A) float roi(int, double);
B) printf("%f", roi(3, amt));
C) roi(3, amt);
D) float roi( int yrs, double rate)
5.
___ is an example of a calling statement.
A) float roi(int, double);
B) printf("%f", roi(3, amt));
C) float roi( int yrs, double rate);
D) float roi( int yrs, double rate)
6.
A local variable that is declared as ____ causes the program to keep the variable and its latest value even when the function that declared it is through executing.
A) auto
B) static
C) extern
D) register
7.
A variable that can store an address is known as a(n) ____ variable.
A) register
B) pointer
C) static
D) extern
8.
To use a stored address, C provides us with an indirection operator, ____.
A) %
B) ^
C) &
D) *
9.
If numAddr is a pointer, ____ means the variable whose address is stored in numAddr.
A) *numAddr
B) numAddr*
C) &numAddr
D) *&numAddr
10.
A(n) ____ is a data type with two main characteristics: (1) its values can be decomposed into individual data elements, and (2) it provides an access scheme for locating individual data elements.
A) data structure
B) scalar data type
C) array
D) atomic data type
11.
A(n) ____, is used to store and process a set of values, all of the same data type, that forms a logical group.
A) data structure
B) scalar variable
C) array
D) atomic variable
12.
Each item in an array is called a(n) ____ of the array.
A) subscript
B) variable
C) index
D) element
13.
In a one-dimensional array in C, the first element has an index of ____.
A) NULL
B) -1
C) 0
D) 1
14.
Any expression that evaluates a(n) ____ may be used as a subscript.
A) character
B) double
C) boolean
D) integer
15.
____ is a correct statement.
A) int grades[5] = {98, 87, 92, 79, 85};
B) int grades[5] = 98, 87, 92, 79, 85;
C) int grades[5] = (98, 87, 92, 79, 85);
D) int grades[5] = [98, 87, 92, 79, 85];
16.
____ declares an array of three rows and four columns.
A) int val[3,4];
B) int val[4,3];
C) int val[3][4];
D) int val[4][3];
17.
____ files store each individual character, such as a letter, digit, dollar sign, decimal point, and so on, using an individual character code.
A) Data
B) Text
C) Binary
D) ASCII
18.
The standard input stream is named ____.
A) stdin
B) stdout
C) instream
D) ostream
19.
Naming a file stream is accomplished by declaring a variable name to be of type ____.
A) FSTREAM
B) fstream
C) FILE
D) file
20.
When an array is created, the compiler automatically creates an internal ____ for it and stores the base address of the array in it.
A) pointer constant
B) address
C) symbolic constant
D) location
21.
Assuming grade is an array of ten integers, the statement ____ is invalid.
A) grade = &grade[2];
B) *grade = *(grade + 2);
C) *grade = *grade + 2;
D) *grade = *(&grade[2]) + 2;
22.
If numPtr is declared as a pointer variable, the expression ____ can also be written as numPtr[i].
A) *numPtr + i
B) (numPtr + i)
C) *numPtr
D) *(numPtr + i)
23.
Which of the following is NOT a computer language
A) Assembly
B) C++
C) Pseudocode
D) Visual Basic
24.
The C language uses which of the following to process code for the computer
A) Archiver
B) Compiler
C) Interpreter
D) Flowcharter
25.
What is the conversion specification (placeholder) for a floating point number?
A) %c
B) %d
C) %f
D) %p
26.
What is the symbol associated with the address operator.
A) &
B) *
C) @
D) |
27.
Which of the following is NOT a valid identifier
A) 4A
B) A3
C) IF
D) tax_rate
28.
Which of the following statements legally declares a character variable options.
A) char options [10];
B) char options
C) Char options ;
D) char options = 'o';
29.
Given x = 5,y = 5,z = 5; z = ++z * y * x++; What is the value of z ?
A) 16
B) 125
C) 150
D) 180
30.
5 && !3 || 7 % 3 - 1
A) True
B) False
31.
int x = 328 , y = 6; printf ("%c" , x / y ); What is the output?
A) 6
B) 54
C) 54.666666
D) 55
32.
An error that causes the program to give an unexpected answer is a
A) Logical Error
B) Runtime
C) Poor Programming Practice Error
D) Syntax Error
33.
The ____ sign is a signal to a C preprocessor.
A) !
B) &
C) ;
D) #
34.
On most computer systems characters read by the keyboard are stored in a temporary holding area called a ____ immediately after they are pressed.
A) register
B) buffer
C) stack
D) RAM
35.
The expression sum = sum + 10 can be written as ____.
A) sum =+ 10
B) sum += 10
C) sum = sum ++ 10
D) sum ++ 10
36.
The logical OR operator is ____.
A) ||
B) &&
C) !
D) %%
37.
Which of the following operators has the highest precedence?
A) !
B) *
C) &&
D) ||
38.
What will the following program print on screen?
int tenure = -5;
if (tenure + 5)
printf("Congratulations!");
else
printf("Sorry");
A) Congratulations!
B) Sorry
C) Runtime error.
D) Nothing; the program will not compile.
39.
Including one or more if-else statements within an if or if-else statement is referred to as a ____ if statement.
A) compound
B) nested
C) multiway
D) short-circuit
40.
In a switch statement, the keyword ____ identifies the values that will be compared to the value of the switch expression.
A) if
B) break
C) case
D) default
41.
In a switch statement, the word ____ is optional and operates the same as the last else in an if-else chain.
A) if
B) break
C) case
D) default
42.
The technique of checking user input data for erroneous or unreasonable data is referred to as ____.
A) user-friendly programming
B) input data validation
C) if-else chaining
D) robust programming
43.
____ is not a relational operator.
A) ==
B) >
C) !=
D) ||
44.
In a(n) ____ loop the condition is tested at the end of the repeating section of code.
A) pretest
B) posttest
C) fixed-count
D) condition-controlled
45.
In the following statements, the printf statement will be executed ____ times.
count = 10;
while (count <= 10)
printf("%d ",count);
A) 0
B) 1
C) 10
D) an infinite number of
46.
Before accumulating values, the accumulator variable should be initialized to ____.
A) -1
B) 0
C) 1
D) NULL
47.
The ____ semicolons must always be present within the for statement
Explanation / Answer
1. B) Called function. A function that is called is a called function. A function prototype is the line at the start of the file that tells the compiler that there is such a function that will be defined later. A calling function is the function that calls the called function. A function declarator tells the compiler that you're defining a function. 2. C) Arguments. Parameters are the types used in the function call. Formal parameters are those listed in the function declaration. Arguments are the variables used in the function call. Formal arguments are the variables in the function declaration. 3. A) Pass by value. Pass by reference passes a pointer to the data rather than making a copy of the data itself. A stub is a placeholder. 4. A) "float roi(int, double);" Note the semicolon at the end. B and C are function calls, D a function declarator. 5. B) "printf("%f", roi(3, amt));" Note that it does not have a type in front of it. A and C are prototypes, D a function declarator. 6. B) static. Auto means local variable. Extern variables are declared outside of the block of code. Register variables are stored in CPU registers instead of RAM. 7. B) pointer 8. D) *. % is modulus, ^ exclusive or, & reference operator. 9. A) *numAddr. B declares a pointer to a numAddr type. &numAddr gives the address of numAddr. *&numAddr gets you right back to numAddr. 10. C) array. A data structure is a type that consists of other types. Scalar data types are the primitives ones like int, float, char, etc. Atomic data types are pretty much the same thing. By the way, I feel like your teacher is just trying to trick you by throwing in terms that you probably haven't seen before. If you're in doubt, go for the one that you've seen before. You'd be surprised how often that works.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.