0

programming languages Online Quiz - 94

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

how can we provide authetication in Windows Service, So that it will not ask for user credentials at the time of installation

  1. By reading context values from command prompt

  2. By hard coding the user credentials in Windows Service file

  3. both are correct

  4. both are incorrect


Correct Option: B

Which contract is used in WCF Service for Exceptions

  1. Message Contract

  2. Exception Contract

  3. Fault COntract

  4. None of the above


Correct Option: C

Which of the following statements is incorrect for MVC

  1. MVC Framework and MVC Pattern are same

  2. in MVC the flow of execution is determined by controller

  3. Routing is used to redirect user to specific page

  4. Model corresponds Database, View corresponds User Interface and Controller handles


Correct Option: A

how can we provide authetication in Windows Service, So that it will not ask for user credentials at the time of installation

  1. By reading context values ( User Authentication Details) from command prompt

  2. By hard coding the user credentials in Windows Service file

  3. both are correct

  4. both are incorrect


Correct Option: C

Which contract is used in WCF Service for Exceptions

  1. Message Contract

  2. Exception Contract

  3. Fault COntract

  4. None of the above


Correct Option: C

How can we manage loss of unhandled packets / Requests in any application

  1. By using some user defined(Custom) Data Queue

  2. By using Microsoft Messaging Queue (MSMQ)

  3. Both of the above

  4. None of the above


Correct Option: B

class A { public void main(String args[]) { System.out.println("Hello World!"); } } What is the output of the program?

  1. Hello World!

  2. "Hello World!"

  3. Compilation Fails

  4. Runtime Exception


Correct Option: D

Consider this as a part of a code which has no compilation errors or runtime exceptions 21.Integer i1=1000; 22.Integer i2=1000; 23.System.out.println(i1==i2); what is the output?

  1. true

  2. false

  3. compilation fails at line 21

  4. compilation fails at line 22


Correct Option: B

int[] a,b[] and int a[],b[] are same??

  1. True

  2. False


Correct Option: B
  1. NullPointerException

  2. NumberFormatException

  3. ExceptionInInitializerError

  4. IllegalArgumentException


Correct Option: A,C

Which one of these are true regarding inheritance in java??

  1. A class can extend multiple classes

  2. An interface can extend multiple classes

  3. An interface can implement multiple interfaces

  4. A class can extend multiple interfaces

  5. A class can implement multiple interfaces

  6. An interface can extend multiple interfaces


Correct Option: E,F

Given a part of code tell the output(Assume that the code is perfect ie no compiler error or runtime exceptions) Pattern p=Pattern.compile("\d+"); Matcher m=p.matcher("345678"); while(m.find()) { System.out.print("-"+m.group()+"-"); }

  1. -345678-

  2. -3--4--5--6--7--8-

  3. -3--34--345--3456--34567--345678-

  4. -345678--345678--345678--345678--345678--345678--345678-


Correct Option: A

Consider the following code snippet String s1="Hello"; String s2=s1; s1.concat("World"); System.out.println(s1+"---"+s2); What is the output??

  1. Hello---Hello

  2. Hello---HelloWorld

  3. HelloWorld---Hello

  4. HelloWorld---HelloWorld


Correct Option: A

Which one of these are legal combinations when used with a method??

  1. abstract final

  2. abstract static

  3. static final

  4. private abstract


Correct Option: C

class A { public void add(int,int) { System.out.println("Normal"); } public void add(int... a) { System.out.println("Varargs"); } public static void main(String... args) { new A().add(9,9); } } what is the output??

  1. Varargs

  2. Normal

  3. Compilation Fails

  4. Runtime Exception


Correct Option: B

Inode contains the following fields?

  1. File owner and File type

  2. File access permission and File access tie

  3. Number of Links, File size and Location of the file data

  4. All of the above


Correct Option: D

In a crontab the job to be executed is scheduled as follows . 10 06 * 8 6 Job to be scheduled Which of the following statement is true?

  1. Command will be executed on every Sunday in 06:10 in September

  2. Command will be executed on every Saturday at 10:06 in August

  3. Command will be executed on every Sunday at 10:06 in September

  4. Command will be executed on every Saturday at 6:10 in August


Correct Option: D

How can I forward all the arguments given to my script to another command? Here Command is the name of the command to be execute.

  1. Command “@$”

  2. command ${@:+"$@"}

  3. command ${"$@+@:”}

  4. Command “$?”


Correct Option: B

The fork() system call is used for the following process management

  1. To increase/decrease the data segment size of a process

  2. To create a new process

  3. To bias the existing priority of a process

  4. To get parent process identifier


Correct Option: B
- Hide questions