Practice questions for this set
Learn 1 /7 Study using Learn
Removing Goto statement from the language.
Give this one a go later!
What is the major improvement of structured programming languages over the earlier
programming languages?
2 What key feature of programming languages is supported by C++, but not Java?
Can the identifier "base_variable" be created from the following BNF ruleset?
3
<char> ::= a | b | c | ... | s | ... | x | y | z
<identifier> ::= <char> | <char> <identifier>
, 4 What is a feature of object-oriented computing?
Press any key to continue Don't know? Continue
Terms in this set (85)
Assume a function requires 20 lines of a longer machine code but with shorter execution time.
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
lead the compiler to generate, for the entire
program,
Assume a variable is declared in a block of starts from its declaration point and extends to the end of the
code within a pair of curly braces. The block.
scope of the variable ______
Assume pointer variable p points to node x, return the memory held by x to the free memory pool.
and node x's next pointer points to node y.
What does free(p) operation mean?
, Assume that the search function of a linked 0, the address of a terminal node
list is specified by
struct Terminal* search();
What values can the search function return?
Select all correct answers.
Assume that you want to delete the entire head = null;
linked list pointed to by head. Which of the
following deletion operation will cause the
most garbage of memory?
Assume this is a 32-bit environment, given a 40
declaration: int a[10]; What is the size (in
bytes) of the entire array?
Assume this is a 32-bit environment, what is 68 bytes
the size of x? (HINT: Don't forget about
padding.)
struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} x;