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

Index of an array starts from

  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 denote operator of logical AND

  1. &&

  2. ^&

  3. !&

  4. &


Correct Option: A

which of these will compile and run? choose all the apply.

  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

How are numeric and character missing values represented internally in SAS?

  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
  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

Select correct answer Given: Class A{ A(){ System.out.print(“A”); } } Class B extends A{ B(){ this(4); super(); System.out.print(“B”); } B(int i){ System.out.print(“C”); } }

  1. Does not compile

  2. prints "ABC"

  3. prints "ACB"

  4. prints "CAB"

  5. run time exception


Correct Option: A

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

Which java collection class can be used to maintain the entries in the order in which they were last accessed?

  1. java.util.HashSet

  2. java.util.LinkedHashMap

  3. java.util.Hashtable

  4. java.util.Vector

  5. none of these


Correct Option: E

How does the following macros will resolve? What will be the output in log file? %let one=two; %let two=three; %let three=one; %put &one; %put &&one; %put &&&one;

  1. two, two, one

  2. two, three, one

  3. two, two, three

  4. two, two, two


Correct Option: C

Which date function advances a date, time or date/time value by a given interval?

  1. INTCK

  2. INTNX

  3. INTCX

  4. INTNK


Correct Option: B

How many observations will be there in the output dataset TEMP? Data temp; Set test (firstobs=50 obs=450); Run;

  1. 450

  2. 401

  3. 400

  4. 500


Correct Option: B
- Hide questions