0
Alien head

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

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

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

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

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

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

Given: class Waiter{ void takeOrders(){ } void serveFood(){ } void takeOrdersAndServe(){ takeOrders(); serveFood(); } }

  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

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

which of the following modifiers can be applied to top level class(i.e., a class which is not enclosed by other class) select all that apply

  1. private

  2. protected

  3. transient

  4. public

  5. final


Correct Option: D,E

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

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

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

The class with name exforsys and having integer data x in its have constructor name as

  1. any name

  2. x

  3. exforsys

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

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

Index of an array starts from

  1. One

  2. Zero

  3. Two

  4. None of the Above


Correct Option: B

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
+ View questions