Tag: programming languages

Questions Related to programming languages

class C{ public static void main(String a[]) { int i1=9; int i2; if(i1>3) { i2=8; } System.out.println(i2); }}What is the result of attempting to compile and run the program?

  1. compile time error

  2. Runtim error

  3. prints 8

  4. prints 0


Correct Option: A

interface I { //1 public class Inner { ///2 Inner ( ) { System .out . println ( "Inner Created" ) ; } }; }; What is the result of attempting to compile and run the program?

  1. compile time error at line 1

  2. compile time error at line 2

  3. the code compiles fine

  4. none of the above


Correct Option: C
  1. Compile failure

  2. sucessfully compiled, but through exception in run time.

  3. It runs sucessfuly and prints "without the main method"

  4. It runs sucessfuly, but No output.


Correct Option: C

Class C { public static void main(String[] args) { int[]a1[]=new int[3][3]; //3 int a2[4]={3,4,5,6}; //4 int a2[5]; //5 } } What is the result of attempting to compile and run the program ?.

  1. compiletime error at lines 3,4,5

  2. compiltime error at line 4,5

  3. compiletime error at line 3

  4. Runtime Exception


Correct Option: B

Which version of Visual Studio first supported Linq for defining standard query operators

  1. VS2003

  2. VS2005

  3. VS2008

  4. VS2010


Correct Option: C