Programming Languages and Concepts Quiz

Test your knowledge of programming concepts across multiple languages including C++, Java, SAS, COBOL, and BASIC. Covers OOP principles, language-specific features, and programming language fundamentals.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

The file extension associated with Websrvice pages in Asp.net is _____.

  1. .aspx
  2. .ascx
  3. .asmx
  4. .ashx
Question 2 Multiple Choice (Single Answer)

A factor in selection of source language is

  1. Programme Skill
  2. Language Availability
  3. Programme capability with other software.
  4. All of the above
Question 3 Multiple Choice (Single Answer)

What is the name given to first generation computer language.

  1. Binary Language
  2. Machine Language
  3. Primary Language
  4. Assembly Language
Question 4 Multiple Choice (Single Answer)

Which are not provided in C

  1. Test and Loops
  2. Grouping and Subprograms
  3. Synchronization and parallel operations
  4. All of the above
Question 5 Multiple Choice (Single Answer)

Which is usually implemented with an interpreters

  1. Assembly
  2. PASCAL
  3. COBOL
  4. BASIC
Question 6 Multiple Choice (Single Answer)

COBOL was designed for

  1. Business
  2. Scientific
  3. Simulation
  4. All of the above
Question 7 Multiple Choice (Single Answer)

What does PROC APPEND do?

  1. appends records anywhere in base dataset
  2. appends records at the start of the base dataset
  3. appends records at the start from the base dataset
  4. appends records at the end of base dataset
Question 8 Multiple Choice (Multiple Answers)

Why might you use PROC CONTENTS?

  1. Describes the structure of the data set
  2. To find variable datatypes
  3. To find unique values
  4. To find total number of obeservations
Question 9 Multiple Choice (Multiple Answers)

Name 3 main report generating Procedures in Base SAS

  1. proc Report
  2. proc Display
  3. proc GPLOT
  4. proc Print
  5. proc Forms
Question 10 Multiple Choice (Single Answer)

public class test { public static void main(String [] args) { int x = 5; test t = new test(); t.doStuff(x); System.out.print("main x = " + x); } void doStuff(int x) { System.out.print("doStuff x = " + x++); } } What is the result?

  1. doStuff x = 6 main x = 6
  2. doStuff x = 5 main x = 6
  3. doStuff x = 5 main x = 5
  4. Compilation fails
Question 11 Multiple Choice (Single Answer)

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
Question 12 Multiple Choice (Single Answer)

public static void main(String [] args) { int x = 5; boolean b1 = true; boolean b2 = false; if ((x == 4) && !b2 ) System.out.print("1"); System.out.print("2"); if ((b2 = true) && b1 ) System.out.print("3"); } } What is the result?

  1. 2
  2. 2 3
  3. 1 2 3
  4. Compilation fails
Question 13 Multiple Choice (Single Answer)

Choose the correct statement:

  1. A final method in class X can be abstract if and only if X is abstract.
  2. A private static method can be called only within other static methods in class X.
  3. A protected method in class X can be overridden by any subclass of X.
  4. A non-static public final method in class X can be overridden in any subclass of X.
Question 14 Multiple Choice (Single Answer)

The idea of hiding data that are not needed for presentation is

  1. Encapuslation
  2. Abstraction
  3. Information Hiding
  4. Polymorphism
Question 15 Multiple Choice (Single Answer)

During Compilation, The function call is replaced by function code for which function?

  1. Virtual functions
  2. Inline functions
  3. Static functions
  4. Friend functions
Question 16 Multiple Choice (Single Answer)

__________ pointer is a type of pointer of any data type and generally takes a value as zero

  1. Vptr
  2. Void
  3. Null
  4. Zero
Question 17 Multiple Choice (Multiple Answers)

Types of Storage Class Variables

  1. Automatic
  2. Global
  3. Static
  4. External
Question 18 Multiple Choice (Single Answer)

A __________function is used for accessing the non-public members of a class.

  1. Static
  2. Virtual
  3. Void
  4. Friend
Question 19 True/False

The static member functions have a class scope and they have access to the 'this' pointer of the class.

  1. True
  2. False
Question 20 Multiple Choice (Multiple Answers)

Types of Polymorphism

  1. Operator overloading
  2. Virtual functions
  3. Virtual base class
  4. Function overloading