0
Alien head

programming languages Online Quiz - 173

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

Main output of M1 program is

  1. CON File

  2. Invalid File

  3. Member-File

  4. Thincard feed

  5. K1DBloader File


Correct Option: C

Main tasks of the M1 processing are

  1. Application of WC3 components

  2. Householding based Sorting

  3. Report Generation

  4. PDF generation


Correct Option: A,B

Output file of a M0 program can has the extension

  1. .TXT

  2. .DAT

  3. .CON

  4. .COD

  5. .EXE


Correct Option: C,D

Main Output of a M0 program will be

  1. An Index File

  2. A Sequential File

  3. It creates tables in the database

  4. None of these


Correct Option: B

For a M0 program , main input can be

  1. A File with .txt extension

  2. A File with .dat extension

  3. A File with .xml extension

  4. Tables in the SQL database

  5. All of these

  6. None of these


Correct Option: E

Following are the main core modules

  1. HC9999M1WC3

  2. HC9999M1

  3. HC9999M2

  4. HC9999R0

  5. HC9999CD

  6. All of the above


Correct Option: F

All M0 is not the part of core modules

  1. True

  2. False


Correct Option: A

For a COBOL program -

  1. EXE is created for the called program and DLL is created for the calling program

  2. EXE is created for the calling program and DLL is created for the called program

  3. EXE is created for the both, called program and calling program

  4. DLL is created for the both, called program and calling program


Correct Option: B

What does it print ? import java.util.*; public class NameGame { public static void main(String args[]) { Map m = new IdentityHashMap(); m.put("Mickey", "Mouse"); m.put("Mickey", "Mantle"); System.out.println(m.size()); } }

  1. Exception

  2. Stack Overflow

  3. 2

  4. 1


Correct Option: D

What does this program do ? public class Null { public static void greet() { System.out.println("Hello world!"); } public static void main(String[] args) { ((Null) null).greet(); } }

  1. Hello world!

  2. Throw a NullPointerException

  3. Won't even compile

  4. Run time error


Correct Option: A

What does this program do ? public class BrowserTest { public static void main(String[] args) { System.out.print("iexplore:"); http://www.google.com; System.out.println(":maximize"); } }

  1. Compilation Error

  2. iexplore::maximize

  3. Runtime Error

  4. None of these


Correct Option: B

What does it print ? /** * Generated by the IBM IDL-to-Java compiler, version 1.0 * from F:\TestRoot\apps\a1\units\include\PolicyHome.idl * Wednesday, June 17, 1998 6:44:40 o'clock AM GMT+00:00 */ public class Test { public static void main(String[] args) { System.out.print("Hell"); System.out.println("o world"); } }

  1. Hello world

  2. Won't even Compile

  3. Run time error

  4. None of these


Correct Option: B

What does it print? public class CleverSwap { public static void main(String[] args) { int x = 1984; int y = 2001; x ^= y ^= x ^= y; System.out.println("x = " + x + "; y = " + y); } }

  1. x = 0; y = 1984

  2. x = 2001; y = 1984

  3. x = 2001; y = 0

  4. x = 1984; y = 2001

  5. x = 0; y = 0

  6. Error


Correct Option: A

What is the output for the below code ? 1. public class Test {2. int i=8; 3. int j=9; 4. public static void main(String[] args){ 5. add(); 6. } 7. public static void add(){ 8. int k = i+j; 9. System.out.println(k); 10. } 11. }

  1. Compilation fails with an error at line 5

  2. Compilation fails with an error at line 8

  3. 17

  4. 0


Correct Option: B

What is the output for the below code ? public class A { public void printValue(){ System.out.println("A"); } } public class B extends A { public void printValue(){ System.out.println("B"); } } 1. public class Test { 2. public static void main(String... args) { 3. A b = new B(); 4. newValue(b); 5. } 6. public static void newValue(A a){ 7. if(a instanceof B){ 8. ((B)a).printValue(); 9. } 10. } 11.}

  1. A

  2. Compilation fails with an error at line 4

  3. B

  4. Compilation fails with an error at line 8


Correct Option: C

HashMap can be synchronized by _______ ?

  1. Map m = Collection.synchronizeMap(hashMap);

  2. Map m = Collections.synchronizeMap(hashMap);

  3. Map m = hashMap.synchronizeMap();

  4. none


Correct Option: B

If we do ArrayList lst = new ArrayList(); What is the initial capacity of the ArrayList lst ?

  1. 8

  2. 10

  3. none

  4. 0


Correct Option: B

What is the output for the below code ? 1. public class Test { 2. public static void main(String... args) { 3. int [] index = new int[5]; 4. System.out.println(index instanceof Object); 5. } 6. }

  1. Compilation fails with an error at line 4

  2. Compilation fails with an error at line 3

  3. true

  4. false


Correct Option: C

What is the output for the below code ? public class A { int k; boolean istrue; static int p; public void printValue() { System.out.print(k); System.out.print(istrue); System.out.print(p); } } public class Test{ public static void main(String argv[]){ A a = new A(); a.printValue();

  1. 0 false 0

  2. 0 true 0

  3. 0 0 0

  4. Compile error - static variable must be initialized before use.


Correct Option: A

try{ File f = new File("a.txt"); }catch(Exception e){ }catch(IOException io){ } Is this code create new file name a.txt ?

  1. True

  2. False

  3. Compile error

  4. none


Correct Option: C
+ View questions