i) Which of the following is true of l-values and r-values a) An l-value is a lo
ID: 3548000 • Letter: I
Question
i) Which of the following is true of l-values and r-values
a) An l-value is a logical value, and an r- value is a real value.
b)l-value are always to the left of r-values
c) An l-value refers to a variable's location while an r-value to its current value
d) l-values are local and r -values are relative.
ii) Which of the following situation will create a "dangling pointer"?
a) setting an arbitrary pointer variable to "null"
b)setting the CDR part of a CONS cell somewhere in the middle of a list to "null"
c)freeing a block to which there still exists a live pointer
d) freeing a block which still contains pointers to other existing block
iii) What distinguishes a purely "functional" programming language from an "imperative" one?
a) There are no variables and hence no assignment operation in a purely functional language
b) A purely functional language lacks the "go to" statement, but an imperative language always has such a command
c) All subprograms must be declared with the keyword function in a purely functional language
d)There is no real difference, only a difference in the recommended coding style
Explanation / Answer
i) Which of the following is true of l-values and r-values
c) An l-value refers to a variable's location while an r-value to its current value
ii) Which of the following situation will create a "dangling pointer"?
c)freeing a block to which there still exists a live pointer
iii) What distinguishes a purely "functional" programming language from an "imperative" one?
a) There are no variables and hence no assignment operation in a purely functional language
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.