0

programming languages Online Quiz - 164

Description: programming languages Online Quiz - 164
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. Use the CLASS Statement when number of observation >10000

  2. Use the By Statement when number of observation <1000

  3. Using the BY Statement requires that the input data set be sorted by the values of the classification variables

  4. Using the CLASS Statement requires that the input data set be sorted by the values of the classification variables


Correct Option: C

Which of the following code gives the output : The MEANS Procedure Analysis Variable : totrev Mean Sum 753.82 12349156.38

  1. PROC MEANS DATA=ORGANIZATION MEAN SUM MAXDEC=2; VAR TOTREV; run;

  2. PROC MEANS DATA=ORGANIZATION MAXDEC=2; VAR TOTREV; run;

  3. PROC MEANS DATA=ORGANIZATION MEAN SUM MAXDEC=2; run;

  4. PROC MEANS DATA=ORGANIZATION SUM ; VAR TOTREV; run;


Correct Option: A
  1. PROC MEANS DATA= ORGANIZATION SUM MEAN ; CLASS REGION; VAR TOTREV / MISSING; run;

  2. PROC MEANS DATA= ORGANIZATION SUM MEAN MAXDEC=0 NMISS; CLASS REGION; VAR TOTREV; run;

  3. PROC MEANS DATA= ORGANIZATION SUM MEAN MAXDEC=0 if not MISSING; CLASS REGION; VAR TOTREV; run;

  4. PROC MEANS DATA= ORGANIZATION SUM MEAN MAXDEC=0 MISSING; CLASS REGION; VAR TOTREV; run;


Correct Option: D
  1. PROC MEANS DATA= ORGANIZATION ; CLASS REGION; VAR TOTREV ; run;

  2. PROC MEANS DATA= ORGANIZATION SUM MEAN MAXDEC=0 ; CLASS REGION; VAR TOTREV ; run;

  3. PROC MEANS DATA= ORGANIZATION SUM MEAN MAXDEC=0 ; BY REGION; CLASS TOTREV ; run;

  4. PROC MEANS DATA= ORGANIZATION SUM MEAN MAXDEC=0 ; CLASS North_Region; VAR TOTREV ; run;


Correct Option: B
  1. Calculate the mean total revenue classified by REGION and RATE_SCHEDULE, but only for the WESTERN and SOUTHERN REGIONS, and only for those two regions whose values of RATE_SCHEDULE start with the string “E1.”

  2. Displays the number of observations(records), mean and total revenue classified by REGION and RATE_SCHEDULE, for the WESTERN and SOUTHERN REGIONS, and only for those two regions whose values of RATE_SCHEDULE start with the string “E1.”

  3. Calculate the mean total revenue classified by REGION and RATE_SCHEDULE, for all the regions except the WESTERN and SOUTHERN REGIONS, and only for those two regions whose values of RATE_SCHEDULE start with the string “E1.”

  4. Displays the Rate Schedule of the WESTERN and SOUTHERN REGIONS where variable TOTREV is an integer.


Correct Option: A
  1. TYPE , FREQ , totrev_Sum , totkwh_Sum , totrev_Mean , tothrs_Median

  2. TYPE , FREQ , total revenue sum , total kwh Sum , total revenue Mean , total hrs Median

  3. TYPE , FREQ , totrev , totkwh , tothrs

  4. totrev_Sum , totkwh_Sum , totrev_Mean , tothrs_Median


Correct Option: A
  1. PROC MEANS DATA= ORGANIZATION MEDIAN MEAN CLM MAXDEC=0; Label TOTREV = 'Total Billed Revenue' TOTKWH = 'Total KwH Consumption'; VAR TOTREV TOTKWH; run;

  2. PROC MEANS DATA= ORGANIZATION MEDIAN MEAN UCLM ; Label TOTREV = 'Total Billed Revenue' TOTKWH = 'Total KwH Consumption'; VAR TOTREV TOTKWH; run;

  3. PROC MEANS DATA= ORGANIZATION MEDIAN MEAN LCLM Label TOTREV = 'Total Billed Revenue' TOTKWH = 'Total KwH Consumption'; VAR TOTREV TOTKWH; run;

  4. PROC MEANS DATA= ORGANIZATION MEDIAN SUM CLM MAXDEC=0; Label TOTREV = 'Total Billed Revenue' TOTKWH = 'Total KwH Consumption'; VAR TOTREV TOTKWH; run;


Correct Option: A

A variable defined in a report is available

  1. For one tab

  2. For all tabs of the Report

  3. Depends how it is defined as global or Private

  4. None of the above


Correct Option: B
  1. java App1.samples.java

  2. java samples.java.App1

  3. javac samples.java.App1

  4. javac App1.samples.java


Correct Option: B
Explanation:

To run an application in Java, the user needs to know the correct command to execute. In this case, we are given the class name and package name of the application we wish to run.

Option A: java App1.samples.java - This option is incorrect because it uses an invalid syntax to run the application. The correct format is "java .".

Option B: java samples.java.App1 - This option is correct. By specifying the full package and class name, we can run the application using the Java Virtual Machine (JVM).

Option C: javac samples.java.App1 - This option is incorrect because the "javac" command is used to compile Java source code, not run an application.

Option D: javac App1.samples.java - This option is incorrect because it uses an invalid syntax to compile the application. The correct format is "javac /.java".

Therefore, the correct answer is:

The Answer is: B

  1. char[] alpha = {'A', 'B', 'C', 'D', 'E'};

  2. char[] alpha = {"A", "B", "C", "D", "E"};

  3. char[] alpha = new char('A', 'B', 'C', 'D', 'E');

  4. char[][] alpha = {{'A', 'B', 'C', 'D', 'E'}};


Correct Option: A
Explanation:

To solve this question, the user needs to know how to declare and initialize an array in Java.

Option A is correct since it declares an array of characters and initializes it with the given values separated by commas within curly braces. This is the correct syntax for initializing a character array in Java.

Option B is incorrect because it uses double quotes (") instead of single quotes (') to initialize the characters. In Java, double quotes are used for Strings while single quotes are used for characters.

Option C is incorrect because the syntax for initializing an array using the "new" keyword is incorrect. The correct syntax is to use square brackets after the data type to specify the size of the array.

Option D is incorrect because it declares a two-dimensional array instead of a one-dimensional array. The inner curly braces are not needed since there is only one dimension.

Therefore, the correct answer is:

The Answer is: A. char[] alpha = {'A', 'B', 'C', 'D', 'E'};

  1. 2^(n-1) to 2^(n+1)+1

  2. -2^(n-1) to 2^(n-1)-1

  3. -2^(n-1) to 2^(n-1)+1

  4. -2^(n-1) to 2^(n+1)-1


Correct Option: B
  1. The compiler interprets the bytecode in the Java class file

  2. The Java Virtual Machine (JVM) interprets the bytecode in the Java class file

  3. The JVM interprets the native machine code

  4. The JVM translates compiled bytecode to machine code


Correct Option: B,D
  1. Create a Salary object

  2. Declare an Employee class

  3. Declare an instance of the Employee class called Promotion

  4. Declare a promotion method that changes the value of the position variable

  5. Define variables for position and salary


Correct Option: B,D
  1. String start = new String("Welcome to Java Programming");

  2. String start[] = "Welcome to Java Programming";

  3. String start = "Welcome to Java Programming";

  4. none


Correct Option: C
  1. To create a mutable string

  2. To store a single character

  3. To store multiple items of the same type

  4. none


Correct Option: C

Assume you create a Student class with the variables name, ID, and course. You then create a method called gradeStudent. If you create a subclass of the Student class called GraduateStudent, what does it inherit?

  1. An instance of the Student class

  2. The course variable

  3. The gradeStudent method

  4. The ID variable

  5. The name variable


Correct Option: B,C,D,E
- Hide questions