0
Alien head

programming languages Online Quiz - 241

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

Which of the following is not true about Reflection (System.Reflection and inherited classes):

  1. To get information about event-handler

  2. To get or set property values

  3. Classes in other namespace can use reflection to access data and to determine which fields to persist

  4. None of the above


Correct Option: D

Which of the following is true:

  1. It is possible for a single class to implement multiple interfaces

  2. It is possible for a class to inherit from multiple classes

  3. It is possible for a class to inherit from a Sealed class

  4. All of above


Correct Option: A

Consider following statements: 1. System.Collections.ArrayList can store values of only single data type 2. System.Collections.ArrayList can store values of multiple data types 3. System.Collections.Generic.List can store values of multiple datatypes 4. System.Collections.Generic.List can store values of only single data type Which of the above is false:

  1. Only 2

  2. Both 1 and 3

  3. 4

  4. Both 2 and 4


Correct Option: B

When you need to perform complex calculations or access external resources in SQL Server 2005, which one of the following programming methods do you use?

  1. SQL Server Management Studio

  2. CLR User Defined Type

  3. CLR Stored Procedure

  4. T-SQL View


Correct Option: C

If you want to use USER32.DLL in your program, which namespace you should use:

  1. System.Collections.Generic

  2. System.Reflection

  3. Microsoft.Office.Interop

  4. None of the above


Correct Option: D

Given the following declarations String s1=new String("Hello")String s2=new String("there");String s3=new String(); Which of the following are legal operations?

  1. s3=s1 + s2;

  2. s3=s1-s2;

  3. s3=s1 & s2;

  4. s3=s1 && s2


Correct Option: A

Which of the following statements are true?

  1. System.out.println( -1 >>> 2);will output a result larger than 10

  2. System.out.println( -1 >>> 2); will output a positive number

  3. System.out.println( 2 >> 1); will output the number 1

  4. System.out.println( 1 <<< 2); will output the number 4


Correct Option: A,B,C

What will happen if you try to compile and run the following code? public class Q { public static void main(String argv[]){ int anar[]=new int[]{1,2,3}; System.out.println(anar[1]); }}

  1. 1

  2. Error anar is referenced before it is initialized.

  3. 2

  4. Error: size of array must be defined.


Correct Option: C

Which of the following are legal identifiers.

  1. 2variable

  2. variable2

  3. _whatavariable

  4. 3

  5. $anothervar

  6. #myvar


Correct Option: B,C,D,E

Which of the following will compile without error.

  1. import java.awt.*;package Mypackage;class Myclass {}

  2. package MyPackage;import java.awt.*;class MyClass{}

  3. /This is a comment */package MyPackage;import java.awt.;class MyClass{}

  4. class Myclass {};import java.awt.*;package Mypackage;


Correct Option: B,C

Zombie process will have parent as init

  1. True

  2. False


Correct Option: A

What is /dev/random device?

  1. A dummy device to represent swap

  2. A dummy device to represent any device

  3. A dummy device to provide infinite number of randon numbers

  4. Invalid device


Correct Option: C

What is /dev/full device in Linux?

  1. A device file to represent that the current file system is full

  2. A device file to test scenarios of testing a /dev/full

  3. Invalid device

  4. None


Correct Option: B

What is a /dev/zero device in Linux?

  1. A dummy device to represent memory

  2. A dummy device to represent the processor

  3. A dummy device to provide infinite number of zeros

  4. None


Correct Option: C

How to create devices/device files in Linux

  1. mkdev

  2. mknod

  3. lndev

  4. None


Correct Option: B

Linux supports multi-threading

  1. True

  2. False


Correct Option: B

How to send signals to other processes?

  1. Use sigsend()

  2. use kill()

  3. use signal()

  4. Only init can send signals


Correct Option: B

Name the element within the tag element that defines the name of the class that implements the functionality of tag. Select the one correct answer.

  1. class-name

  2. tag

  3. class

  4. tag-class

  5. tei-class


Correct Option: D

Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers.

  1. name

  2. description

  3. validator

  4. tag-class

  5. display-name


Correct Option: A,D

Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers.

  1. tlib-version

  2. short-name

  3. uri

  4. display-name


Correct Option: A,B
+ View questions