0

programming languages Online Quiz - 11

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

Libname statements can be used to create excel workbooks

  1. True

  2. False


Correct Option: A

We can assign NULL to const pointer after initializing once.

  1. True

  2. False


Correct Option: B

What makes C++ to support function overloading ?

  1. Polymorphism

  2. Inheritance

  3. Name Mangling

  4. Function Signature


Correct Option: C

Following functionality in C++ violates the encapsulation.

  1. Pointers

  2. Friend Function

  3. Access Specifiers

  4. None


Correct Option: B

What is the memory of a class that contains niether data members nor member functions ?

  1. 0 bytes

  2. 1 bit

  3. same as sizeof(int)

  4. 1 byte


Correct Option: D

How many differnces are there between structures in C and C++ ?

  1. 1

  2. No difference

  3. 2

  4. 5


Correct Option: D

How many differnces we can find between structures in C and C++ ?

  1. 1

  2. No difference

  3. 2

  4. 5


Correct Option: A

We can initialize following type of variables in class declaration.

  1. static

  2. const

  3. extern

  4. none


Correct Option: D

What will be the output of the program?

public abstract class AbstractTest {
 public int getNum() {
  return 45;
 }
 public abstract class Bar {
  public int getNum() {
   return 38;
  }
 }
 public static void main(String[] args) {
  AbstractTest t = new AbstractTest() {
   public int getNum() {
    return 22;
   }
  };
  AbstractTest.Bar f = t.new Bar() {
   public int getNum() {
    return 57;
   }
  };
  System.out.println(f.getNum() + " " + t.getNum());
 }
}
  1. 57 22

  2. 45 38

  3. 45 57

  4. An exception occurs at runtime.


Correct Option: A
  1. if((i == 0) || (j/i == 1))

  2. if((i == 0) | (j/i == 1))

  3. if((i != 0) && (j/i == 1))

  4. if((i != 0) & (j/i == 1))


Correct Option: B,D

JAIN stands for Java Integrated Networks

  1. True

  2. False


Correct Option: A
- Hide questions