programming languages Online Quiz - 274
programming languages Online Quiz - 274
Questions
int i=5; if(i=4) { printf("A"); } else { printf("B"); }
- This code will hang
- This code will print B.
- This code will print A.
- Compilation Error
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?
- LINE15
- LINE10
- LINE13
- LINE9
The scrolling option in IDEAL can be changed to cursor
- True
- False
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
- 3
- 6
- 5
- 4
What is the column range in an IDEAL program & Panel
- 1-60 & 1-72
- 1-62 & 1-72
- 1-70 & 1-80
- 1-72 & 1-80
The command to increase the command line from 1 to 3 ie => to => => => is
- SET COMMAND 3
- SET COMMAND 3 LINE
- SET COMMAND LINE 3
- SET LINE COMMAND 3
Which command displays the date on the command line?
- DATE
- TIME
- DATE-TIME
- $DATE
Which statement is used to reverse the order of variable say X ='abcde' to X ='edcba'
- REVERSE
- INVERT
- INVERSE
- RESHOW
ERROR is internal variable to mark the error within a dataset?
- True
- False
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?
- We need to use LIBREF to refer an input file
- We need to use double quotes instead of single quotes
- Comments are not proper
- Complier is at fault.
Function to change a focus to another column in Datawindow
- ChangeColumn(integer column)
- SetColumn
- SetColumn(integer column)
- ChangeColumn
Function to displays an icon to indicate the current row in a DataWindow
- SetRowFocusIcon
- SetRowFocusIndicator(RowFocusInd focusindicator {, integer xlocation {, integer ylocation } }
- ShowIcon
- ShowRowFocusIcon(RowFocusInd focusindicator {, integer xlocation {, integer ylocation } }
Sorting can only be done at the client?
- True
- False
Function used to change the SQL statement of a DataWindow? (Other than the Modify function)
- SetSQLSelect
- ChangeSQLSelect ( string statement )
- ChangeSQLSelect
- SetSQLSelect ( string statement )
Which event will fire, When a user types in an edit control in the DataWindow control
- EditChanged
- ItemChanged
- Itemerror
- DataChanged
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
- it should be: Proc print; set=test;
- it should be: Proc print set=test;
- Complier is acting crazy
- SET option cannot be used with Proc
- None of the above
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?
- Run is missing
- semi colon missing
- no problem
- cannot use label in data step
Which of the following is not a type of Workflow Task
- Mapping
- Decision
- Session
- Email
Which of the following is not a character function
- LTRIM
- SUBSTR
- CONCAT
- TRUNC