Stored program concept (von Neumann machine) is one of the most fundamental
concepts in computer science. What programming paradigm most closely follows this
concept? ANSW - Imperitive
What computing paradigm can solve a problem by describing the requirements, without
writing code in a step-wise fashion to solve the problem. ANSW - Logic
What computing paradigm enforces stateless (no variable allowed) programming?
ANSW - Functional
What is a feature of object oriented computing? ANSW - State encapsulation
In contrast to Web 1.0 what is the key function of Web 2.0? ANSW - Web is the
computing platform
Because of hardware constraints early programming languages emphasized ANSW -
Efficiency
What factor is generally considered more important in modern programming language
design? ANSW - Readability
The main idea of structured programming is to ANSW - Reduce the types of control
structures
Implicit type conversion is commonly referred to as: ANSW - Coercion
In the following pseudocode which programming language allows the mixed use of data
types?
int i = 1; char c = 'a' ; // declaration & initiali
c = c + I; ANSW - C
In the layers of programming language structure, which layer performs type checking?
ANSW - contextual
Which of the following statement is correct if language is strongly typed select all that
applies.
A. Each variable in a program has a single type associated with it.
B. Variable type can be unknown at compilation time
C. Type errors are always reported.
, D. Coercion is automatically allowed. ANSW - A,C
Which command (construct) has a loop when expressed in syntax graphs? ANSW -
Switch
The contextual structure of a programming language defines ANSW - The static
semantics that will be checked by the compiler
If a program contains an error that divide a number by zero at execution time. This error
is a ANSW - Semantic error
Interpretation is not efficient if ANSW - Multi-module programming is used
What is the difference between an in-line function and a macro in C++? ANSW -
Inlining is a suggestion to the compiler, while a macro definition will be enforced
Macros-processing takes place during which phase? ANSW - Preprocessing
Assume a function requires 20 lines of machine code and will be called 10 times in the
main program. You can choose to implement it using a function definition or a macro
definition. Compared with the function definition, macro definition will leave the compiler
to generate, for the entire program, ANSW - A longer machine code but with shorter
execution time.
Forward declaration in modern programming practice ANSW - Provide a level of
abstraction
C language does not have a Boolean type because ANSW - Boolean values can be
represented as integers
Two functions are said to be mutually recursive if ANSW - They call each other
What is the maximum number of padding bytes that a compiler can add to a structure?
ANSW - More than 3
The enumeration type of values are stored in the memory as ANSW - Int
If we want to store a linked list of structures, with each structure containing different
types of data, into a disk file, what type of file should we choose? ANSW - Binary file
The reason that we need to call fflush() or cin.ignore() is because the previous ANSW -
Input leaves a character in the file buffer.
What parameter passing mechanism cannot change the variable values in the caller?
ANSW - Call-by-values