Tag: programming languages

Questions Related to programming languages

To which numbering system can the binary number 1101100100111100 be easily converted to?

  1. Octal

  2. Binary itself

  3. Hexa decimal

  4. None of the above


Correct Option: C

son,Travis, The following output is desired relation firstname son Travis Which one of the following statements will work correctly as exepcted ?

  1. data family/dlm = ',';

  2. options dlm=',';

  3. infile 'file-specification' dlm=',';

  4. input relation $ firstname $ /dlm=',';


Correct Option: C

data sasdata.atlanta sasdata.boston work.portland work.phoenix; set company.prdsales; if region='NE' then output boston; if region='SE' then output atlanta; if region='SW' then output phoenix; if region='NW' then output portland; Which one of the following is true regarding the output datasets

  1. No library references are required

  2. The datasets listed on all the IF statements require a library reference

  3. The datasets listed on the last two IF statements require a library reference

  4. The datasets listed on the first two IF statements require a library reference


Correct Option: D

The sasdata.banks dataset has 5 observations when the following SAS program is submitted data allobs; set sasdata.banks; capital=0; do year = 2000 to 2020 by 5; capital + ((capital + 2000) * rate); output; end; run; How many observations will the ALLOBS data set contain?

  1. 5

  2. 10

  3. 20

  4. 25


Correct Option: D

----|----10----|----20----|----30 john McCloskey 35 71 June Rosesette 10 43 Tineke Jones 9 37 The following SAS program is submitted using the raw data file as input: data work.homework; infile 'file-specification'; input name $ age height; if age LE 10; run; How many observations will the WORK.HOMEWORK dataset contain?

  1. 0

  2. 3

  3. 2

  4. No dataset is created as the program fails to execute due to errors


Correct Option: B

The attribute information includes the variable’s name, type, ......

  1. Length

  2. Format

  3. Informat

  4. Label


Correct Option: A,B,C,D

Some of the dataset options are

  1. print the observations of the dataset

  2. renaming variables

  3. selecting only the first or last n observations for processing

  4. dropping variables from processing or from the output data set


Correct Option: B,C,D

The general form of SUM statement is

  1. variable = variable+expression;

  2. variable+expression;

  3. sum(expression,variable)

  4. expression=variable+expression;


Correct Option: B

The sum statement is equivalent to using the SUM function and the RETAIN statement, as shown here: retain variable 0; variable=sum(variable,expression);

  1. True

  2. False


Correct Option: A

The following SAS program is submitted: data work.flights; destination='CPH'; select(destination); when('LPR') city = 'London'; when('CPH') city='Copenhagen'; otherwise; end;run; Which one of the following is the value of the CITY variable?

  1. London

  2. Copenh

  3. Copenhagen

  4. Missing


Correct Option: B