Question: Variables are defined dynamically. When you log in to a system, no variables are defined. The course of your program will define variables via the

Variables are defined dynamically. When you log in to a system, no variables are defined. The course of your program will define variables via the READ (R) and SET (S) commands, and undefine variables via the KILL (K) command. Notice that commands can be abbreviated to one letter.
As you know, there are two kinds of variables: string and numeric. A variable may be defined via a READ command, in which case it is automatically a string. The other way a variable can be defined is by the SET command which can define it as either string or numeric.
The syntax for the SET command is:
S argl,arg2...argx
The statement
S VAR=EXP
replaces (or defines) the variable VAR with the value of the expression EXP. The data type of VAR is determined by the expression.
Question. If I execute the following code
R Z S X=Z,Y=X
what type of variables are X, Y and Z?
1. All numeric
2. All string
3. X, Y numeric; Z string
4. X numeric; Y, Z string
5. X numeric; Y, Z undefined
6. Cant tell without more information

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!