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.
Questions
Encapsulation is the process of combining data and functions into a single unit called class.
- True
- False
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.
- a only
- a and b
- b only
- none of the above
Default return type of functions in C++ is
- Void
- Int
- Bool
- none of the above
Which of the following statement/statements is /are true ?
- Reference types are stored on stack and value types are stored on heap area.
- Boxing allows you to convert value types to reference types.
- For boxing, during runtime it creates a temporary reference type box for the object on the heap
- Unboxing allows you to convert reference type to value type
Which statement is/are correct ?
- In C#, we can define one and only one main( ) method .
- If there is more than one main( ) method defined in your programme ,the compiler will return compile time error.
- 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.
- All the statements are wrong
Which of these are correct answers for Identifiers used in C# ?
- These are the names that one user gives to variables such as the user defined types(eg;classes and structs)
- These are not case sensitive.
- Their names must begin with a letter or with a underscore .
- They must not contain any numeric characters
Which statement is/are correct ?
- You can not use C# keywords as the Identifiers
- abstract is a valid identifier .
- _Identifier and \u006fIdentifier are identical
- Identifiers can also contain unicode characters.
Which of the folowing are correct for the Structs and Classes ?
- Both are essential templates for which we can create objects.
- Both structs and classes are reference types and are stored on heap .
- For both struct and class, we use 'new' keyword to declare an instance.
- All of the above are correct
Which of the following are correct ?
- Value types are stored in heap and reference types are stored in stack area.
- Boxing allows users to convert value types to reference types
- Unboxing allows users to convert value type to reference type.
- During runtime boxing creates a temporary reference type box for the object on the heap.
Choose the correct statements for creating a table?
- Names are case sensitive.
- Names must not be oracle server reserve word.
- Table names and column names need not be start with a letter.
- We cannot use a column alias in a WHERE clause
Table may also called as
- Relation
- Entity
- Records
- Fields
The process of modeling data into relational tables is called normalization.
- True
- False
Which of the following are Data manipulation language commands(DML)?
- Select
- Insert
- Update
- Create
- Delete
- Alter
At what situation you will create Index?
- The column contain wide range of values.
- The column contain large number of Null values.
- The table is large.
- Columns which are not frequently used.
Which operation code allows you to update only specified fields on a record?
- EXFMT
- UPDAT
- EXCPT
- WRITE
In RPG, how would you reverse the sign of a numeric field?
- Z-SUB
- MULT -1
- 0 SUB
- all the above
What is the maximum number of files that can be specified in a RPG400 program?
- 40
- 60
- 100
- 50
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
- CD
- BC
- DE
- EF
CPF4131 message indicates a level check error?
- True
- False
How would you find out what locks are active on any object?
- DSPLCK
- DSPOBJLCK
- DSPSYSLCK
- DSPACTLCK