0
Alien head

programming languages Online Quiz - 75

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

______ means that both the data and the methods which may access it are defined together in the same unit.

  1. Data hiding

  2. Encapsulation

  3. Data Binding

  4. None of these options


Correct Option: B

Maintaining the state of an object is called____?

  1. Serialization

  2. Persistence

  3. Marshalling

  4. None of these options


Correct Option: B

Abstract class cannot have ________?

  1. Zero instance

  2. Multiple instance

  3. Both Zero instance & Multiple instance

  4. None of these options


Correct Option: C

_________is a relationship

  1. Polymorphism

  2. Inheritance

  3. Overloading

  4. None of these options


Correct Option: B

A derived class

  1. Inherits data members and member functions from base class

  2. Inherits constructors and destructor

  3. Object can access protected members with the dot operator

  4. Inherits data members and member functions from base class as well as Inherits constructors and destructor


Correct Option: D

Can two classes contain member functions with the same name?

  1. No

  2. Yes, but only if the two classes have the same name

  3. Yes, but only if the main program does not declare both kinds

  4. Yes, this is always allowed


Correct Option: D

A recursive function would result in infinite recursion, if the following were left out:

  1. Base case

  2. Recursive call

  3. Subtraction

  4. Local variable declarations


Correct Option: C

Which is a logical abstract base class for a class called "footballPlayer"?

  1. Salary

  2. Sport

  3. Athlete

  4. Team


Correct Option: C

What is the program design method we learned in order to write Object Oriented Programs?

  1. Declare - Define - Use

  2. Public functions and private variables

  3. Top - Down programming

  4. Bottom - Up programming


Correct Option: C

How do you manage states in asp.net application

  1. Session object

  2. Application object

  3. View state

  4. All of the above


Correct Option: D

The number of forms that can be added to a aspx page is.

  1. 1

  2. 2

  3. 3

  4. more than 3


Correct Option: A

What's the difference between Response.Write() andResponse.Output.Write()?

  1. Response.Output.Write() allows you to flush output

  2. Response.Output.Write() allows you to buffer output

  3. Response.Output.Write() allows you to write formatted output

  4. Response.Output.Write() allows you to stream output


Correct Option: C

To add a custom control to a Web form we have to register with.

  1. TagPrefix

  2. Name space of the dll that is referenced

  3. Assemblyname

  4. All of the above


Correct Option: D

When an .aspx page is requested from the web server, the out put will be rendered to browser in following format.

  1. HTML

  2. XML

  3. WML

  4. JSP


Correct Option: A

Which of the following languages can be used to write server side scripting in ASP.NET?

  1. c#

  2. VB

  3. C++

  4. A & B


Correct Option: D

SELECT address1||','||address2||','||address2 "Adress" FROM employee;

  1. 1

  2. 2

  3. 3

  4. 0


Correct Option: C

public static void main(String[] args) { String str = "null"; if (str == null) { System.out.println("null"); } else (str.length() == 0) { System.out.println("zero"); } else { System.out.println("some"); } } What is the result?

  1. null

  2. zero

  3. some

  4. Compilation fails


Correct Option: D

public class Yippee2 { static public void main(String [] yahoo) { for(int x = 1; x < yahoo.length; x++) { System.out.print(yahoo[x] + " "); } } } and the command line invocation: java Yippee2 a b c What is the result?

  1. a b

  2. b c

  3. a b c

  4. Compilation fails


Correct Option: B

NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(4); nf.setMinimumFractionDigits(2); String a = nf.format(3.1415926); String b = nf.format(2); Which statement is true about the result?

  1. The value of b is 2

  2. The value of b is 2.00

  3. The value of a is 3.141

  4. The value of a is 3.1415


Correct Option: B

System.out.format("Pi is approximately %d.", Math.PI); What is the result?

  1. Compilation fails

  2. Pi is approximately 3

  3. Pi is approximately 3.141593

  4. An exception is thrown at runtime


Correct Option: D
+ View questions