CNIT 105 MIDTERM QUESTIONS & ANSWERS
int division 3. = ____ - Answers -.75
Function's output data type - Answers -Data type of the function's output.
Void means no output
"C" is NOT an object __________ language, it is a ___________ language - Answers -
oriented
procedural
Life cycle of the C language - Answers -i. Preprocessor, compiler, Linker
ii. Preprocessor directive: #include <stdio.h>
iii. Preprocessor goes through the program before the compiler
Extension of the source file in "C" - Answers -.c
'a' is a single character, takes one byte in memory - Answers -N/A
"a" is a string - It takes 2 bytes in memory - Answers -N/A
Global scope - Answers -a. variables declared outside the functions have global scope
- can be used in the code that comes after their declaration.
Cascading if - else if - Answers -Only one of the branches get executed
Function's input parameters - Answers -i. Have local scope in the function
ii. The function receives the input information via the input parameters.
do - while loop (4) - Answers -i. Will get executed at least once.
ii. Condition is checked at the end of the cycle
iii. Ideal loop to rerun the program
iv. Ideal loop for validating the range
Fill array with random numbers - Answers -int k;
for (k = 0; k < 100; k++)
int division 3. = ____ - Answers -.75
Function's output data type - Answers -Data type of the function's output.
Void means no output
"C" is NOT an object __________ language, it is a ___________ language - Answers -
oriented
procedural
Life cycle of the C language - Answers -i. Preprocessor, compiler, Linker
ii. Preprocessor directive: #include <stdio.h>
iii. Preprocessor goes through the program before the compiler
Extension of the source file in "C" - Answers -.c
'a' is a single character, takes one byte in memory - Answers -N/A
"a" is a string - It takes 2 bytes in memory - Answers -N/A
Global scope - Answers -a. variables declared outside the functions have global scope
- can be used in the code that comes after their declaration.
Cascading if - else if - Answers -Only one of the branches get executed
Function's input parameters - Answers -i. Have local scope in the function
ii. The function receives the input information via the input parameters.
do - while loop (4) - Answers -i. Will get executed at least once.
ii. Condition is checked at the end of the cycle
iii. Ideal loop to rerun the program
iv. Ideal loop for validating the range
Fill array with random numbers - Answers -int k;
for (k = 0; k < 100; k++)