0

programming languages Online Quiz - 259

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

In C++ the function that is used to release the block of memory already used is

  1. release

  2. deallocate

  3. delete

  4. all the above


Correct Option: C
  1. One

  2. Zero

  3. Two

  4. None of the Above


Correct Option: B

Which of the following OOPS concepts are used with cin and cout

  1. Data Hiding

  2. Encapsulation

  3. Operator Overloading

  4. None Of the Above


Correct Option: C

Which of the following is used to store data of different types

  1. Arrays

  2. Structures

  3. Both a and b

  4. None of the Above


Correct Option: B
  1. LinkedList l=new LinkedList();

  2. List l=new LinkedList();

  3. LinkedList l=new LinkedList();

  4. LinkedList l=new LinkedList()

  5. List l=new LinkedList();


Correct Option: B,C
  1. numeric will be represented by blank and character will be represented by .

  2. both character and numeric will be represented as blanks

  3. numeric will be represented by . and character will be represented by blank

  4. numeric will be represented by . and character will be represented by NULL values


Correct Option: C

class A{ int b=10; private A(){ this.b=7; } int f(){ return b; } } class B extends class A{ int b; } class Test{ public static void main(String args[]){ A a=new B(); System.out.println(a.f()); } }

  1. Does not compile

  2. prints 0

  3. prints 10

  4. prints 7


Correct Option: A

what could be replaced with the "XX" in the following program to compile and run sucessfully? select four choices. class Parent{ public void amethod(int i) throws IOException{ } } public class Child extends Parent{ //XX }

  1. public void amethod(int i) throws FileNotFoundException{ }

  2. public void amethod(int i) throws IOException, RuntimeException{ }

  3. public void amethod(int i) throws RuntimeException{ }

  4. public void amethod(int i) throws Exception{ }

  5. public void amethod(int i) { }

  6. public void amethod(int i) throws Throwable{ }


Correct Option: A,B,C,E

Class Foo{ Int num; Baz comp=new Baz(); } Class Bar{ Boolean flag; } Class Baz extends Foo{ Bar thing=new Bar(); Double limit; }

  1. A Bar is a Baz

  2. A Foo has a Bar

  3. A Baz is a Foo

  4. A Foo is a Baz

  5. A Baz has a Bar


Correct Option: C,E
  1. It exhibits high cohesion

  2. It exhibits low cohesion

  3. It exhibits tight coupling

  4. It exhibits loose coupling

  5. None of the Above


Correct Option: B

Which of the most suitable java collection class for storing various currencies and their equivalent prices in USD if multiple threads access and modify this data? It is required that class should be synchronized inherently

  1. HashSet

  2. Vector

  3. HashMap

  4. TreeMap

  5. None of the above


Correct Option: E
  1. java.util.HashSet

  2. java.util.LinkedHashMap

  3. java.util.Hashtable

  4. java.util.Vector

  5. none of these


Correct Option: E

Which of the following can be used to read numeric values that contain numeric values and commas into a SAS dataset?

  1. comma. informat

  2. dollar. format

  3. comma. format

  4. w.d informat


Correct Option: A
- Hide questions