0

programming languages Online Quiz - 215

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

What are the valid values of SYSENV macro variable

  1. FORE, BACK

  2. OpenVMS,WIN, HP 300

  3. Batch,Interactive

  4. All of the above


Correct Option: A

(a) %let prog=%str(data new; x=1; run;); (b) %let prog=data new%str(;) x=1%str(;)run%str(;); The above two are equivalent?

  1. True

  2. False


Correct Option: B

%let a=begin; %let b=%nrstr(&a); %put UPCASE produces: %upcase(&b); %put QUPCASE produces: %qupcase(&b); The output of the two put statement is :

  1. BEGIN and &A

  2. begin and &A

  3. begin and begin

  4. begin and BEGIN


Correct Option: A

What are the resulting values for the macro variables that are defined here? %let month1 = June; %let month2 = July; %let period1 = &month1&month2; %let period2 = May&month1; %let period3 = &month2.Aug;

  1. month1 June month2 July period1 June July period2 May June period3 July Aug

  2. month1 June month2 July period1 JuneJuly period2 MayJune period3 July.Aug

  3. month1 June month2 July period1 JuneJuly period2 MayJune period3 JulyAug

  4. month1 June month2 July period1 junejuly period2 Mayjune period3 julyaug


Correct Option: C
Explanation:

To understand the resulting values for the macro variables, we need to know that the ampersand (&) is used to reference the value of a macro variable. The resulting values for the macro variables are:

  • %let month1 = June; (the value of month1 is "June")
  • %let month2 = July; (the value of month2 is "July")
  • %let period1 = &month1&month2; (the value of period1 is "JuneJuly")
  • %let period2 = May&month1; (the value of period2 is "MayJune")
  • %let period3 = &month2.Aug; (the value of period3 is "July.Aug")

Therefore, the answer is:

The Answer is: C

%let lib=sasuser; %let year=02; %let month=jan; libname &lib ’SAS-data-library’; proc print data=&lib.y&year&month; run; The dataset name that proc print gets is "sasusery02jan".Which of the following character you will use in place of to finally have "sasuser.y02jan" dataset. proc print data=&lib.y&year&month; run;

  1. . (period)

  2. &(ampersand)

  3. %(percentage)

  4. Any one of the above character


Correct Option: A

Which of the following correctly produces a title in which the current date is left justified in order to remove extra blanks?

  1. title "Report for %sysfunc(left(%sysfunc(today(),worddate.)))";

  2. title "Report for %sysfunc(left(today(), worddate.))";

  3. title "Report for %sysfunc(left(%qsysfunc(today(), worddate.)))";

  4. title "Report for %left(today(), worddate.))";


Correct Option: C

AI Explanation

To answer this question, you need to understand how to format a title in SAS using the %sysfunc function to manipulate the current date.

Let's go through each option to understand why it is correct or incorrect:

Option A) title "Report for %sysfunc(left(%sysfunc(today(),worddate.)))"; This option is incorrect because it uses an unnecessary nested %sysfunc function. The left function should be applied directly to the result of %sysfunc(today(),worddate.) to left justify it.

Option B) title "Report for %sysfunc(left(today(), worddate.))"; This option is incorrect because it does not use the proper syntax for the %sysfunc function. The %sysfunc function should be used with a specific SAS function, such as date. or left..

Option C) title "Report for %sysfunc(left(%qsysfunc(today(), worddate.)))"; This option is correct because it uses the %sysfunc function with the left function to left justify the result of %qsysfunc(today(), worddate.). The %qsysfunc function is used to resolve any potential macro quoting issues.

Option D) title "Report for %left(today(), worddate.))"; This option is incorrect because it does not use the %sysfunc function to manipulate the current date. The left function should be used within the %sysfunc function to left justify the result.

The correct answer is C. This option is correct because it properly uses the %sysfunc function with the left function and the %qsysfunc function to left justify the result of %qsysfunc(today(), worddate.).

Suggest the most appropriate masking macro function that can be used to read the following text strings: Pride and Prejudice Rice & Beans Charles Dickens' Complete Works

  1. %QUOTE , %NRQUOTE , %BQUOTE

  2. %NRQUOTE , %NRQUOTE , %QUOTE

  3. %QUOTE , %QUOTE , %NRQUOTE

  4. %QUOTE , %BQUOTE , %NRQUOTE


Correct Option: A

New functions provided with SAP NetWeaver PI 7.1 are an extension of the robust architecture based on

  1. JEE5

  2. VB

  3. .NET

  4. ABAP


Correct Option: A

The integral part of SAP Netweaver is made up of

  1. Enterprise Service Repository

  2. Enterprise Service Registry

  3. Integration Directory

  4. Integration Builder


Correct Option: A,B

The Expansion for eSOA

  1. Extensible Service Oriented Architecture

  2. Extensible Schema of Application

  3. Enterprise Schema Oriented Application

  4. enterprise Service Oriented Architecture


Correct Option: D

As of SAP Netweaver PI 7.1 , the Integration Builder(Design) is replaced by

  1. Operation mapping

  2. Service Interface

  3. Enterprises Service Builder

  4. Communication Component


Correct Option: C

As of SAP Netweaver PI 7.1 , Interface mapping is replaced by

  1. Message mapping

  2. Communication Channel

  3. Operation mapping

  4. Communication Component


Correct Option: C

Among the following choices which is correct about readonly variable in C# code?

  1. It's the same as a constant

  2. It's value can be assigned only once

  3. You can never assign a value to it

  4. You can assign value multiple times


Correct Option: B

What is a manifest ?

  1. area where the assembly code is compiled

  2. area in which Debug information is a stored

  3. area in which Assembly metadata is stored

  4. area where variables are initialized


Correct Option: C

COM objects can be called in C# using :

  1. DLLImport

  2. UsingDLL

  3. DLLCall

  4. CallDLL


Correct Option: A

In C# an assembly is deployed

  1. Using MSI installer

  2. using XCOPY

  3. using a CAB archive

  4. All of the above


Correct Option: D

Which among the following is a valid syntax defining a delegate

  1. delegate {TheMethod( int Z) }

  2. delegate void TheMethod(int Z) ;

  3. delegate: TheMethod (int Z)

  4. delegate: {TheMethod (int Z)}


Correct Option: B

Which of the following is an exclusive feature of C#?

  1. Object Oriented

  2. IL

  3. XML documentation

  4. Garbage Collection


Correct Option: C

AI Explanation

To answer this question, you need to understand the features of the C# programming language. Let's go through each option to understand why it is correct or incorrect:

Option A) Object Oriented - This option is incorrect because C# is an object-oriented programming language, but it is not an exclusive feature of C#. Many programming languages, such as Java and C++, are also object-oriented.

Option B) IL - This option is incorrect because Intermediate Language (IL) is not an exclusive feature of C#. IL is a common feature in languages that target the .NET framework, including C#.

Option C) XML documentation - This option is correct because XML documentation is an exclusive feature of C#. C# allows developers to document their code using XML comments, which can be used to generate documentation files.

Option D) Garbage Collection - This option is incorrect because garbage collection is not an exclusive feature of C#. Garbage collection is a memory management technique that is used in many programming languages, including C#.

The correct answer is C) XML documentation. This option is correct because XML documentation is a feature that is unique to C# and allows developers to document their code using XML comments.

Considering that applications are running in different application domains how does a running application communicate or share data with other application?

  1. using Exceptions

  2. using attributes

  3. using .NET remoting services

  4. using IO


Correct Option: C
  1. Structs cannot be inherited.

  2. Structs are passed by value, not by reference.

  3. Struct is stored on the stack, not the heap.

  4. structs can be inherited


Correct Option: A
- Hide questions