0

programming languages Online Quiz - 171

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

which of this command is used for starting a window application thru batch files?

  1. type

  2. open

  3. start

  4. go


Correct Option: C

Which of this command is used for prompting the user to press any key to continue in batch files?

  1. prompt

  2. pause

  3. ask

  4. enter


Correct Option: B

which of this command is used to run another batch file within a batch file?

  1. continue

  2. goto

  3. route

  4. call


Correct Option: D

which of this is used to prevent any of the commands in the batch file from being displayed?

  1. @

  2. #

  3. $

  4. %


Correct Option: A

Variables in the interface must be initialized and are static & final.

  1. True

  2. False


Correct Option: A

Analyze the following code: boolean even = false; if (even = true) { System.out.println("It is even!"); }

  1. The program has a syntax error.

  2. The program has a runtime error.

  3. The program runs fine, but displays nothing.

  4. The program runs fine and displays It is even!.


Correct Option: D

Analyze the following program fragment: int x; double d = 1.5; switch (d) { case 1.0: x = 1; case 1.5: x = 2; case 2.0: x = 3; }

  1. The program has a syntax error because the required break statement is missing in the switch statement.

  2. The program has a syntax error because the required default case is missing in the switch statement

  3. The switch control variable cannot be double.

  4. No errors


Correct Option: C

Analyze the following code. public class Test { public static void main(String[] args) { System.out.println(max(1, 2)); } public static double max(int num1, double num2) { System.out.println("max(int, double) is invoked"); if (num1 > num2) return num1; else return num2; } public static double max(double num1, int num2) { System.out.println("max(double, int) is invoked"); if (num1 > num2) return num1; else return num2; } }

  1. The program cannot compile because you cannot have the print statement in a non-void method

  2. The program cannot compile because the compiler cannot determine which max method should be invoked

  3. The program runs and prints 2 followed by "max(int, double)" is invoked.

  4. The program runs and prints 2 followed by "max(double, int)" is invoked.


Correct Option: B

What is sum after the following loop terminates? int sum = 0; int item = 0; do { item++; sum += item; if (sum > 4) break; } while (item < 5);

  1. 5

  2. 6

  3. 7

  4. 8


Correct Option: B

Which of the following abbreviations is incorrectly expanded?

  1. CTS - Common Type System

  2. CLS - Common Language Specification

  3. CAS - Component Authorization Specification

  4. FCL - Framework Class Library


Correct Option: C

Which of the following statements is false about Windows Communication Framework (WCF)

  1. WCF Service can define Data, Service, fault and Message contract

  2. MSMQ binding, Web Service (WS) binding, Basic binding and TCP binding are part of standard binding supported by WCF

  3. WCF also support authentication using Issued token by secure token service

  4. WCG support Message reliability without ordered delivery


Correct Option: D

Which of the following features was first introduced with .Net 2.0

  1. .Net Compact Framework

  2. Support for IP6

  3. Windows Card Space

  4. Generics


Correct Option: D

Windows Presentation Foundation - the new user interface system was introduced with

  1. .NET Framework 1.1

  2. .NET Framework 2.0

  3. .NET Framework 3.0

  4. .NET Framework 3.5


Correct Option: C

Which of the following statements is false about Common Language Runtime

  1. .NET Framework 2.0 CLR was was introduced with VS 2005

  2. .Net Framework 3.0 uses the .NET Framework 2.0 CLR

  3. .Net Framework 3.5 uses the .NET Framework 2.0 CLR

  4. .Net Framework 3.5 SP1 first time introduce the .NET Framework 3.0 CLR


Correct Option: D

What attribute must be set on a validator control for the validation to work ?

  1. Validate

  2. ValidateControl

  3. ControlToBind

  4. ControlToValidate


Correct Option: D
  1. In Page directive set EnableViewStateMac="true"

  2. In Register directive set EnableViewStateMac="true"

  3. In web config set Protectviewstate="true"

  4. In IIS set Viewstate protection.


Correct Option: A
  1. All Standard Pages

  2. Active Server Pages

  3. A Server Page

  4. Active Standard Pages


Correct Option: B
- Hide questions