Programming Languages Quiz: RPG, SQL, C#, and C++

Test your knowledge across multiple programming languages and database concepts including RPG400/AS400 commands, SQL operations, C# language features, and C++ programming fundamentals.

20 Questions Published

Questions

Question 1 True/False

Encapsulation is the process of combining data and functions into a single unit called class.

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

Which of the following statements are true?a. By default,all members of structure are private.b.new and delete operator can be overlaodedc.friend fucntion can overload [],(),= operators.

  1. a only
  2. a and b
  3. b only
  4. none of the above
Question 3 Multiple Choice (Single Answer)

Default return type of functions in C++ is

  1. Void
  2. Int
  3. Bool
  4. none of the above
Question 4 Multiple Choice (Multiple Answers)

Which of the following statement/statements is /are true ?

  1. Reference types are stored on stack and value types are stored on heap area.
  2. Boxing allows you to convert value types to reference types.
  3. For boxing, during runtime it creates a temporary reference type box for the object on the heap
  4. Unboxing allows you to convert reference type to value type
Question 5 Multiple Choice (Multiple Answers)

Which statement is/are correct ?

  1. In C#, we can define one and only one main( ) method .
  2. If there is more than one main( ) method defined in your programme ,the compiler will return compile time error.
  3. If there is more than one main( ) method defined you can explicitely tell the compiler which main( ) method is to be used as the entry point.
  4. All the statements are wrong
Question 6 Multiple Choice (Multiple Answers)

Which of these are correct answers for Identifiers used in C# ?

  1. These are the names that one user gives to variables such as the user defined types(eg;classes and structs)
  2. These are not case sensitive.
  3. Their names must begin with a letter or with a underscore .
  4. They must not contain any numeric characters
Question 7 Multiple Choice (Multiple Answers)

Which statement is/are correct ?

  1. You can not use C# keywords as the Identifiers
  2. abstract is a valid identifier .
  3. _Identifier and \u006fIdentifier are identical
  4. Identifiers can also contain unicode characters.
Question 8 Multiple Choice (Multiple Answers)

Which of the folowing are correct for the Structs and Classes ?

  1. Both are essential templates for which we can create objects.
  2. Both structs and classes are reference types and are stored on heap .
  3. For both struct and class, we use 'new' keyword to declare an instance.
  4. All of the above are correct
Question 9 Multiple Choice (Multiple Answers)

Which of the following are correct ?

  1. Value types are stored in heap and reference types are stored in stack area.
  2. Boxing allows users to convert value types to reference types
  3. Unboxing allows users to convert value type to reference type.
  4. During runtime boxing creates a temporary reference type box for the object on the heap.
Question 10 Multiple Choice (Multiple Answers)

Choose the correct statements for creating a table?

  1. Names are case sensitive.
  2. Names must not be oracle server reserve word.
  3. Table names and column names need not be start with a letter.
  4. We cannot use a column alias in a WHERE clause
Question 11 Multiple Choice (Multiple Answers)

Table may also called as

  1. Relation
  2. Entity
  3. Records
  4. Fields
Question 12 True/False

The process of modeling data into relational tables is called normalization.

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

Which of the following are Data manipulation language commands(DML)?

  1. Select
  2. Insert
  3. Update
  4. Create
  5. Delete
  6. Alter
Question 14 Multiple Choice (Multiple Answers)

At what situation you will create Index?

  1. The column contain wide range of values.
  2. The column contain large number of Null values.
  3. The table is large.
  4. Columns which are not frequently used.
Question 15 Multiple Choice (Single Answer)

Which operation code allows you to update only specified fields on a record?

  1. EXFMT
  2. UPDAT
  3. EXCPT
  4. WRITE
Question 16 Multiple Choice (Single Answer)

In RPG, how would you reverse the sign of a numeric field?

  1. Z-SUB
  2. MULT -1
  3. 0 SUB
  4. all the above
Question 17 Multiple Choice (Single Answer)

What is the maximum number of files that can be specified in a RPG400 program?

  1. 40
  2. 60
  3. 100
  4. 50
Question 18 Multiple Choice (Single Answer)

What is the value of RESULT after the following process: C Z-ADD3 T 20 C MOVEL'ABCDEF' STRING 10 C 2 SUBSTSTRING:T RESULT 90

  1. CD
  2. BC
  3. DE
  4. EF
Question 19 True/False

CPF4131 message indicates a level check error?

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

How would you find out what locks are active on any object?

  1. DSPLCK
  2. DSPOBJLCK
  3. DSPSYSLCK
  4. DSPACTLCK