programming languages Online Quiz - 256
Description: programming languages Online Quiz - 256 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
You have to sort the dataset Temp by the values of salary in descending order. SORT procedure is given below. Find out the missing statement? Data temp; Infile datalines; Input empname $ salary; Datalines; AAA 25000 BBB 45000 CCC 36000 DDD 47000 ; Proc sort data=temp; <<<<<<>>>>>>>>>; Run;
How can you assign a value from a datastep to a macro variable?
Can we use title statement inside Proc SQL?
What is the value of z? z=weekday(today()); Today being Wednesday, 30 September 2009
What are the different classes of tokens available in SAS?
What is the use of macro function %SYSFUNC?
In Proc SQL, Index can be created on tables and views. State whether the statement is true or false. Also classify the index types in Proc SQL?
What is the value stored in the variable x? Data test; name = ’TATA CONSULTANCY SERVICES’; b = ’C’; x = INDEX (name, b); Run;
What is the use of %INCLUDE statement in a program?
What is the SAS data value of 01-Jan-1960?
How many variables will be there in the output dataset totmark? Data totmark; Set scores (keep=name mark1 mark2 ); Total = mark1 + mark2; Drop mark1 mark2; Run;
State which of the following statement(s) are correct regarding Proc SQL?
char* riteshFunc (char *ptr) { ptr += 3; return (ptr); } int main() { char *x, *y; x = "HELLO"; y = riteshFunc(x); printf ("y = %s \n", y); return 0; } What will print when the sample code above is executed?
What will be the result of compiling and running the following code? (Assume that assertions are enabled at compile time as well as at runtime.) class Test { String f(int i) { switch (i) { case 0: return "A"; case 1: return "B"; case 2: return "C"; default: assert false; } } public static void main(String[] args) { Test t = new Test(); for (int i = 0; i < 4; i++) { System.out.print(t.f(i)); } } }
Given the code below, which access modifiers (public, protected, or private) can legally be placed before the myMethod() method on line 3, if no other changes are made to the code? If line 3 is left as it is, which keywords can legally be placed before the myMethod method on line 8? 1. class HumptyDumpty 2. { 3. void myMethod() {} 4. } 5. 6. class HankyPanky extends HumptyDumpty 7. { 8. void myMethod() {} 9. }
Which is the most appropriate way to handle invalid method arguments passed to a public method?
What will be printed on standard output if the following class is executed using the command "java Test 1 two 3" ? public class Test { static public void main(String[] args) { try { int k = Integer.parseInt(args[1]); System.out.println(args[k]); } catch (Exception e) { System.out.println(e); } } }
What will be the result of compiling and running the following code? public class MyThread extends Thread { public static void main(String[] args) { new MyThread().start(); } }
Given the following two classes, which statement is true? ---------- class-1 ---------- package pack; public class Parent { protected void test() { System.out.println("Test"); } } ---------- class-2 ---------- 1. package mypack; 2. import pack.*; 3. class ParentTest extends Parent{ 4. public static void main(String[] args){ 5. new ParentTest().test(); 6. new Parent().test(); 7. } 8. }