Microsoft .NET Framework and Web Programming

Quiz covering .NET Framework technologies including ASP.NET web controls, CLR, WPF, WCF, framework history, and related programming concepts

20 Questions Published

Questions

Question 1 True/False

Batch file commands are not case sensitive.

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

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

  1. type
  2. open
  3. start
  4. go
Question 3 Multiple Choice (Single Answer)

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
Question 4 Multiple Choice (Single Answer)

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

  1. continue
  2. goto
  3. route
  4. call
Question 5 Multiple Choice (Single Answer)

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

  1. @
  2. #
  3. $
  4. %
Question 6 Multiple Choice (Single Answer)

which of this command is used to print a message in batch file?

  1. print
  2. type
  3. label
  4. echo
Question 7 True/False

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

  1. True
  2. False
Question 8 Multiple Choice (Single Answer)

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!.
Question 9 Multiple Choice (Single Answer)

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
Question 10 Multiple Choice (Single Answer)

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.
Question 11 Multiple Choice (Single Answer)

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
Question 12 Multiple Choice (Single Answer)

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
Question 13 Multiple Choice (Single Answer)

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
Question 14 Multiple Choice (Single Answer)

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
Question 15 Multiple Choice (Single Answer)

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
Question 16 Multiple Choice (Single Answer)

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
Question 17 Multiple Choice (Single Answer)

What HTML element is the asp:Label control rendered as when the target is Internet Explorer ?

  1. <label>
  2. <table>
Question 18 Multiple Choice (Single Answer)

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

  1. Validate
  2. ValidateControl
  3. ControlToBind
  4. ControlToValidate
Question 19 Multiple Choice (Single Answer)

How to protect view state from tampering when it's passed over an unencrypted channel ?

  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.
Question 20 Multiple Choice (Single Answer)

What does ASP stand for ?

  1. All Standard Pages
  2. Active Server Pages
  3. A Server Page
  4. Active Standard Pages