Tag: programming languages
Questions Related to programming languages
-
proc sql; update work.frequentflyers set pointsearned=pointsearned* case if milestraveled < 10000 then 1.5 if milestraveled >= 10000 then 2 else 1 end;
-
proc sql; update work.frequentflyers set pointsearned=pointsearned* case when milestraveled < 10000 then 1.5 when milestraveled >= 10000 then 2 else 1 end;
-
proc sql; update work.frequentflyers set pointsearned=pointsearned* case if milestraveled < 10000 then pointsearned*1.5 if milestraveled >= 10000 then pointsearned*2 else 1 end;
-
proc sql; update work.frequentflyers set pointsearned=pointsearned* case if milestraveled < 10000 then pointsearned*1.5 if milestraveled >= 10000 then pointsearned*2 else pointsearned*1 end;
-
proc sql; describe as select * from sasuser.payrollmaster;
-
proc sql; describe contents sasuser.payrollmaster;
-
proc sql; describe table sasuser.payrollmaster;
-
proc sql; describe * from sasuser.payrollmaster;
-
KEY
-
UNIQUE
-
NODUPS
-
NODUPKEY
-
View State
-
key
-
LCID
-
Session Id
-
any number, 1
-
1, Any Number
-
any Number, any Number
-
1,1
-
Custom Attributes
-
Funtional Attributes
-
Predefined Attributes
-
Both A & C
-
You can call a method on null: x.m() will not throw an error when x is null and m is a static method.
-
null instanceof Object returns true
-
You can pass null as the literal argument to a constructor of an anonymous inner class. e.g., new SomeClass(null) { }
-
None of above
-
Adding state variables breaks referential transparency (you no longer can understand a statement or expression on its own: you need to understand it in the context of the settings of the global variables)
-
State variables lessen the cohesion of a program: you need to know more to understand how something works. A major point of Object-Oriented programming is to break up global state into more easily understood collections of local state.
-
When you add one variable, you limit the use of your program to one instance. What you thought was global, someone else might think of as local: they may want to run two copies of your program at once.
-
All of above