Computer Knowledge

Programming Fundamentals

2,381 Questions

Programming fundamentals form the core logic of software development and computer science. This includes variable declarations, pointer assignments, loop iterations, and exception handling. These technical topics are regularly tested in computer knowledge and IT officer competitive examinations.

Variables and arraysPointer assignmentsLoop iterationsException handling blocksCompile time errorsFunction references

Programming Fundamentals Questions

Multiple choice technology databases
  1. to_date(string,format)

  2. to_char(date,format)

  3. to_date(date,format)

  4. to_number(string,format)

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The to_char function converts a date value to a string representation in the specified format. Option B is the correct PostgreSQL and Oracle function. Option A (to_date) converts string to date, option C is an invalid signature, and option D converts strings to numbers, not dates to strings.

Multiple choice technology enterprise content management
  1. r_frozen_flag

  2. r_has_frzn_assembly

  3. both

  4. none

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The r_frozen_flag attribute is set to true when an object is explicitly frozen using the freeze() method, indicating it's now immutable. The r_has_frzn_assembly attribute indicates frozen assembly membership but is not the direct flag for individual object freeze status.

Multiple choice technology enterprise content management
  1. r_frozen_flag

  2. r_has_frzn_assembly

  3. both

  4. none

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The r_frozen_flag attribute is set to true when an object is explicitly frozen using the freeze() method, indicating it's now immutable. The r_has_frzn_assembly attribute indicates frozen assembly membership but is not the direct flag for individual object freeze status.

Multiple choice technology testing
  1. Function Generator

  2. Step Factory

  3. Function Factory

  4. None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In QTP/UFT, the Step Generator (sometimes called Step Factory in documentation) is the feature used to construct test steps by selecting operations on test objects. Function Generator is used for inserting functions, not constructing steps with object operations.

Multiple choice technology testing
  1. 2

  2. 1

  3. 3

  4. No index is required for referencing an element in a 2D array. Index is applicable only for 1D arrays.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A 2-dimensional array requires exactly 2 indices - one for the row and one for the column. Each index specifies a position along one of the dimensions. Option D is incorrect because 2D arrays definitely need indices; option B (1 index) is for 1D arrays, and option C (3 indices) would be for 3D arrays.

Multiple choice technology testing
  1. While … Wend

  2. Do While … Loop

  3. Do Until … Loop

  4. VB Script doesn't have any deprecated loops at all.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In VBScript, While ... Wend is considered obsolete and deprecated in favor of the more flexible Do ... Loop structures. The language reference recommends avoiding While ... Wend in modern scripts.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

GETCURSOR is a statement in SAP ABAP used to capture the field value and position when a user double-clicks on a field in a list (ALV or basic list). It stores the field name, value, and line number, allowing the program to trace which specific data element was interacted with. This is commonly used for drill-down functionality and interactive reporting.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In ABAP, internal tables passed using the TABLES parameter are passed by reference (address), not by value and result. The TABLES keyword creates a reference to the original internal table, so any changes made within the subroutine directly affect the calling program's table. Value and result would mean copying the entire table structure on both entry and exit, which would be inefficient for large internal tables.

Multiple choice technology databases
  1. CASE

  2. ISNULL

  3. ISNUMERIC

  4. ISDATE

  5. None

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A deterministic function always returns the same result for the same input. Non-deterministic functions can return different results. ISDATE is non-deterministic because its behavior depends on session settings like DATEFORMAT and LANGUAGE - the same string might be interpreted differently. CASE, ISNULL, and ISNUMERIC are deterministic functions.