Interview Report
- 0of 0 votes
AnswersQuestion: What is the value of A after executing the following?
- jaq0033@my.londonmet.ac.uk April 27, 2016 in united kingdom
S A=1, B=1, C=1, A=1+A+(A-1)
A. 5
B. 3
C. 2
D. 1| Report Duplicate | Flag | PURGE
- 0of 0 votes
AnswersThe syntax for the SET command is: S arg1,arg2...argx
- jaq0033@my.londonmet.ac.uk April 27, 2016 in united kingdom
S VAR=expression
S VAR1=exp1,VAR2=exp2... S X=Y
Assigns the value of the expression
to the variable VAR. The data type
of VAR is determined by the expression.
Assigns values to multiple variables.
Assigns the value of variable Y to variable X.
Question: If I say: R Z S X=Z, Y=X
What type of variables are X, Y and Z?
A. All string
B. All numeric
C. X, Y numeric; Z string
D. X numeric; Y, Z string
E. X numeric; Y, Z undefined
F. Can't tell without more information| Report Duplicate | Flag | PURGE
- 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