programming languages Online Quiz - 274

programming languages Online Quiz - 274

19 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

int i=5; if(i=4) { printf("A"); } else { printf("B"); }

  1. This code will hang
  2. This code will print B.
  3. This code will print A.
  4. Compilation Error
Question 2 Multiple Choice (Single Answer)

LINE:1 i=1, line=5; LINE:2 for(i=1;i<=line;i++) LINE:3 { LINE:4 for(j=1;j<=line- i;j++) LINE:5 { LINE:6 printf(" " ); LINE:7 } LINE:8 for(j=1;j<=i;j++) LINE:9 { LINE:10 printf("*"); LINE:11 } LINE:12 line--; LINE:13 printf("\n"); LINE:14 } this will print: * ** *** **** ***** Now change the code in such a way that by using only one key for once such that this code will print: * * * * * * * * * * * * * * * In which line you need to change the code using that key?

  1. LINE15
  2. LINE10
  3. LINE13
  4. LINE9
Question 3 True/False

The scrolling option in IDEAL can be changed to cursor

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

W01_VAR a X(6) variable is assigned the value 'IDEAL' W01_LEN is defined as U Z(1) The output of the following code is Set W01_LENGTH = $LEN(W01_VAR) LIST W01_LENGTH

  1. 3
  2. 6
  3. 5
  4. 4
Question 5 Multiple Choice (Single Answer)

What is the column range in an IDEAL program & Panel

  1. 1-60 & 1-72
  2. 1-62 & 1-72
  3. 1-70 & 1-80
  4. 1-72 & 1-80
Question 6 Multiple Choice (Single Answer)

The command to increase the command line from 1 to 3 ie => to => => => is

  1. SET COMMAND 3
  2. SET COMMAND 3 LINE
  3. SET COMMAND LINE 3
  4. SET LINE COMMAND 3
Question 7 Multiple Choice (Single Answer)

Which command displays the date on the command line?

  1. DATE
  2. TIME
  3. DATE-TIME
  4. $DATE
Question 8 Multiple Choice (Single Answer)

Which statement is used to reverse the order of variable say X ='abcde' to X ='edcba'

  1. REVERSE
  2. INVERT
  3. INVERSE
  4. RESHOW
Question 9 True/False

ERROR is internal variable to mark the error within a dataset?

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

Following program is submitted: * Read the data file testdatadat using list input DATA test; INFILE 'c:\MyRawData\testdata.dat'; INPUT Name $ Weight age; RUN; In SAS log we got: 1 * Read the data file ToadJump.dat using list input 2 DATA test; 3 INFILE 'c:\MyRawData\testdata.dat'; ------ 180 ERROR 180-322: Statement is not valid or it is used out of proper order. 4 INPUT Name $ Weight age; ----- 180 ERROR 180-322: Statement is not valid or it is used out of proper order. 5 RUN; What is the problem?

  1. We need to use LIBREF to refer an input file
  2. We need to use double quotes instead of single quotes
  3. Comments are not proper
  4. Complier is at fault.
Question 11 Multiple Choice (Single Answer)

Function to change a focus to another column in Datawindow

  1. ChangeColumn(integer column)
  2. SetColumn
  3. SetColumn(integer column)
  4. ChangeColumn
Question 12 Multiple Choice (Single Answer)

Function to displays an icon to indicate the current row in a DataWindow

  1. SetRowFocusIcon
  2. SetRowFocusIndicator(RowFocusInd focusindicator {, integer xlocation {, integer ylocation } }
  3. ShowIcon
  4. ShowRowFocusIcon(RowFocusInd focusindicator {, integer xlocation {, integer ylocation } }
Question 13 True/False

Sorting can only be done at the client?

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

Function used to change the SQL statement of a DataWindow? (Other than the Modify function)

  1. SetSQLSelect
  2. ChangeSQLSelect ( string statement )
  3. ChangeSQLSelect
  4. SetSQLSelect ( string statement )
Question 15 Multiple Choice (Single Answer)

Which event will fire, When a user types in an edit control in the DataWindow control

  1. EditChanged
  2. ItemChanged
  3. Itemerror
  4. DataChanged
Question 16 Multiple Choice (Single Answer)

8 PROC PRINT; 9 SET test; --- 180 ERROR 180-322: Statement is not valid or it is used out of proper order. 10 RUN; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE PRINT used (Total process time): real time 0.01 seconds cpu time 0.01 seconds

  1. it should be: Proc print; set=test;
  2. it should be: Proc print set=test;
  3. Complier is acting crazy
  4. SET option cannot be used with Proc
  5. None of the above
Question 17 Multiple Choice (Single Answer)

data sample1; infile 'example2.dat'; input caseid 1-4 mathsat 6-8 score 10-11 sex $ 13 teach 15 format sex $fsex.; label caseid='Subject Number' mathsat='SAT Math Score' score='Final Calculus Score' sex='Sex of Participant' teach='Student Rated Teaching Ability'; proc freq data=sample1; tables sex teach; run; What is the mistake?

  1. Run is missing
  2. semi colon missing
  3. no problem
  4. cannot use label in data step
Question 18 Multiple Choice (Single Answer)

Which of the following is not a type of Workflow Task

  1. Mapping
  2. Decision
  3. Session
  4. Email
Question 19 Multiple Choice (Single Answer)

Which of the following is not a character function

  1. LTRIM
  2. SUBSTR
  3. CONCAT
  4. TRUNC