0

programming languages Online Quiz - 274

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

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


Correct Option: A

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


Correct Option: B

The scrolling option in IDEAL can be changed to cursor

  1. True

  2. False


Correct Option: A

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


Correct Option: B

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


Correct Option: D

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


Correct Option: C

Which command displays the date on the command line?

  1. DATE

  2. TIME

  3. DATE-TIME

  4. $DATE


Correct Option: B

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

  1. REVERSE

  2. INVERT

  3. INVERSE

  4. RESHOW


Correct Option: B

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.


Correct Option: C

Function to change a focus to another column in Datawindow

  1. ChangeColumn(integer column)

  2. SetColumn

  3. SetColumn(integer column)

  4. ChangeColumn


Correct Option: C

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 } }


Correct Option: B

Sorting can only be done at the client?

  1. True

  2. False


Correct Option: B

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 )


Correct Option: D

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

  1. EditChanged

  2. ItemChanged

  3. Itemerror

  4. DataChanged


Correct Option: A

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


Correct Option: D

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


Correct Option: B

Which of the following is not a type of Workflow Task

  1. Mapping

  2. Decision

  3. Session

  4. Email


Correct Option: A

Which of the following is not a character function

  1. LTRIM

  2. SUBSTR

  3. CONCAT

  4. TRUNC


Correct Option: D

Select the statement below that is false

  1. Tasks must be within Workflows in order to be executed

  2. Workflows must be within Tasks to be executed

  3. Workflow links may contain conditions

  4. A start task is default task in a Workflow


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Tasks must be within Workflows in order to be executed - This statement is true. In most workflow systems, tasks are organized within workflows, and the execution flow of tasks is defined by the workflow.

Option B) Workflows must be within Tasks to be executed - This statement is false. Workflows are higher-level structures that define the order and dependencies of tasks. Workflows contain tasks, not the other way around. Tasks are executed within workflows.

Option C) Workflow links may contain conditions - This statement is true. Workflow links can have conditions associated with them, which determine the flow of execution based on certain criteria. These conditions can be used to create conditional branches and control the flow of the workflow.

Option D) A start task is the default task in a Workflow - This statement is false. While a start task is often used to initiate a workflow, it is not a default task in a workflow. A workflow can have multiple entry points or trigger points, depending on the specific requirements of the system.

The correct answer is B) Workflows must be within Tasks to be executed. This statement is false because workflows contain tasks, and tasks are executed within workflows.

- Hide questions