Interview Question
- 0of 0 votes
AnswersThere is a KILL command which removes a variable and its value from the symbol table, thus undefining it. The syntax for the KILL is:
- jaq0033@my.londonmet.ac.uk April 27, 2016 in united kingdom
K A KILL command followed by 2 spaces kills all variables. K VAR The variable VAR is killed, if it exists.
K (VAR,VAS) All variables except VAR and VAS are killed.
The most common use of KILL is to free storage space. Another use is to flag conditions - if a particular value is defined, that means one thing; and if it is undefined, that means something else.
Question: K S S="4",T=S+2,Z=T>6 K K, J, S What variables are defined and what are their values?
A. T=6,Z=” “
B. T=”6”, Z=0
C. S=”4”,T=6,Z=0
D. S=”4”,T=”6”,X=”0”
E. S=”4”,T=”6”,Z=”FALSE”
F. S=”4”,T=”S+2”,Z=”T>6”
G. No variables are defined| Report Duplicate | Flag | PURGE
Algorithm
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.