0

programming languages Online Quiz - 144

Description: programming languages Online Quiz - 144
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

What is/are purpose(s) of XML Schema?

  1. Document Generation

  2. Code Generation

  3. Both 1 and 2

  4. None of the above


Correct Option: C

What is the first line in an XML Schema?


Correct Option: D

package varargs; public class TestVarargs1 { public static void displayVal(String... str) { for (String strValue : str) { System.out.println("String value............." + strValue); } } public static void displayVal(int... integer) { for (int intValue : integer) { System.out.println("Integer value............." + intValue); } } public static void main(String[] args) { displayVal(); } }

  1. String value.............null

  2. Exception

  3. Compiler Error

  4. Integer value.............0


Correct Option: C

data new; x = '1000'; y= x * .10; run; What is the result?

  1. y = '100'

  2. y = 100 and a NOTE is written in the SAS log saying that character value has been converted to numeric value

  3. y = 100 and no NOTE is written in the SAS log

  4. Program does not execute due to Syntax Errors


Correct Option: B

proc print data=sales; run; options ? proc means data=sales; run; Which option statement has to be used to reset the page number to 3 for the second report?

  1. options reset pagenum=3;

  2. options reset pageno=3;

  3. options pageno=3;

  4. options pagenum=3;


Correct Option: C

data quote; infile datalines dlm=','; input x y$; datalines; 10,"100" ; run; What will be the output?

  1. x y {10 }

  2. Syntax Error due to the double quotes

  3. x y { 10 "100" }

  4. x y { 10 100 }


Correct Option: C

data count; array x{3} (1,2,3); run; What is the result?

  1. No observations.No variables

  2. variable x is created with 3 observations with values 1,2 and 3

  3. Array should be given a name during initialization.Syntax Error

  4. The variables x1 , x2 and x3 are created with the values 1, 2 and 3


Correct Option: D

The output required from proc means is min, max and nmiss.Also the decimal values should be aligned to 2 digits.Which proc statement satisfies the requirement

  1. proc means; ( min max nmiss maxdec=2);

  2. proc means; var x /min max nmiss maxdec=2;

  3. proc means min max nmiss maxdec=2;

  4. proc means; var x ( min max nmiss maxdec=2);


Correct Option: C

The option available for displaying proc freq for getting a cross tabulation of the fields product and region is

  1. tables product/region;

  2. tables product * region;

  3. tables product,region;

  4. tables product region;


Correct Option: B

which of the following proc statement can be used to delete all the SAS datasets present in the library MyWork

  1. proc datasets lib=Mywork kill ;run;

  2. proc datasets lib=Mywork delete ;run;

  3. proc datasets; lib=Mywork delete ;run;

  4. proc datasets lib=Mywork erase ;run;


Correct Option: A

The option to give in order to make SAS to continue processing even if there are any formats that is given in the sas program is not available is

  1. options NOFMT;

  2. options NOFMTERR;

  3. options FMTERR;

  4. options NOERR;


Correct Option: B

proc format; value num 1-6 = 'High' 6-10= 'Low'; run;

  1. Format is not created

  2. Format is created with the name of num

  3. ERROR: These two ranges overlap: 1-6 and 6-10 (fuzz=1E-12).

  4. Syntax Error


Correct Option: B

data y; set x; length a $12; run; In the dataset x there is a variable called a which is numeric and of length 8.What is the result of this data step?

  1. No observations in dataset y

  2. variable a in dataset y will be numeric and of length 8

  3. variable a in dataset y will be character and of length 12

  4. Error since the variable a is defined as both character and numeric


Correct Option: D

There are 2 datasets sales and income.Sales has a variable pno and income has a variable product.Both are same.The third dataset has to be formed by merging sales and income that has the same products.Which is the correct option?

  1. data new;set income(in=IN_A rename=( product = pno)) sales(in=in_b); if IN_A and IN_B;run;

  2. data new;merge income(in=IN_A) (rename( product = pno)) sales(in=IN_B);run;

  3. data new;merge income(in=IN_A) (rename=( product = pno)) sales(in=IN_B);if IN_A and IN_B;run;

  4. data new;merge income(in=IN_A rename=( product = pno)) sales(in=in_b); if IN_A and IN_B;run;


Correct Option: D

Which macro variable contains the value of current date

  1. SYSDATE9

  2. DATE10

  3. SYSTIME

  4. DATE6


Correct Option: A

The report output should be {x y } {1 2} {2 5} {Total 2} Choose the correct option. NOTE { } are added for readability

  1. proc print data = new N='total';

  2. proc print data = new sum='total';

  3. proc print data = new; sum/ label='total';

  4. proc print data = new sum; label='total';


Correct Option: A

The default number of error messages that are displayed in SAS log is

  1. 3

  2. 6

  3. 5

  4. 20


Correct Option: D

In order to write each input record into the log the option used is

  1. put ;

  2. put list;

  3. list;

  4. put LIST;


Correct Option: C

To display all the values of all the variables in the log, the option used is

  1. put ALLVAR

  2. put VAR

  3. put ALL;

  4. put ;


Correct Option: C

x=intck('week.4','01JAN2010'd,'01FEB2010'd); What is the value of x ?

  1. 0

  2. Syntax Error - week.4

  3. 5

  4. 4


Correct Option: D
- Hide questions