0

programming languages Online Quiz - 91

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

Which of these is used to open an database?

  1. Set dbMyDB = OpenDatabase

  2. Set dbMyDB = OpenDatabase("MyDatabase.mdb")

  3. dbMyDB = OpenDatabase("MyDatabase.mdb")

  4. None of these


Correct Option: B
  1. The Class window

  2. The Project window

  3. The Properties window

  4. The Blank Form window


Correct Option: A

Which of these is not an collection of the VB project?

  1. The object module

  2. The class module

  3. The form module

  4. The global module


Correct Option: A

What will be printed out if this code is run with the following command line? java myprog good morning public class myprog{ public static void main(String argv[]) { System.out.println(argv[2]); } }

  1. myprog

  2. good

  3. morning

  4. Exception raised: "java.lang.ArrayIndexOutOfBoundsException: 2"


Correct Option: D

A byte can be of what size

  1. -128 to 127

  2. (-2 power 8 )-1 to 2 power 8

  3. -255 to 256

  4. depends on the particular implementation of the Java Virtual machine


Correct Option: A

What data will be printed out if you attempt to compile and run the following code(ignore newline in output)? int i=1; switch (i) { case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2: System.out.println("two"); default: System.out.println("default"); }

  1. one

  2. one default

  3. one two default

  4. default


Correct Option: C

Which of the following will output -4.0

  1. System.out.println(Math.floor(-4.7));

  2. System.out.println(Math.round(-4.7));

  3. System.out.println(Math.ceil(-4.7));

  4. System.out.println(Math.min(-4.7));


Correct Option: C

Which of the following lines will compile without warning or error.

  1. float f=2.3;

  2. char c="z";

  3. boolean b=null;

  4. int i=21;

  5. byte b=257;


Correct Option: D

Which of the following is not a keyword or reserved word in Java?

  1. if

  2. then

  3. goto

  4. while

  5. case


Correct Option: B

if(check4Biz(storeNum) != null) {} Referring to the above, what datatype could be returned by method check4Biz()?

  1. Boolean

  2. int

  3. char

  4. float


Correct Option: A
  1. -128 to 127

  2. (-2 power 8 )-1 to 2 power 8

  3. -255 to 256

  4. 8


Correct Option: A

System.out.println(4 | 3);

  1. 6

  2. 0

  3. 1

  4. 7


Correct Option: D
- Hide questions