Computer Knowledge

Programming Fundamentals

2,611 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 performance
  1. If

  2. For

  3. Do

  4. While

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

The If keyword is a conditional statement that executes code based on whether a condition is true or false. For, Do, and While are loop constructs that repeat code blocks multiple times. Conditional statements control program flow based on conditions, while loops control iteration.

Multiple choice technology performance
  1. File

  2. Unique

  3. Random

  4. Sequential

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

In HP LoadRunner (or Micro Focus VuGen) Run Logic block properties, the block execution logic can be set to either 'Sequential' or 'Random' to control how the containing actions are called. 'File' and 'Unique' are parameter types, not block run logic settings.

Multiple choice technology platforms and products
  1. If-then-else block

  2. Switch block

  3. While block

  4. Any of the above

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

Conditional branching in BPEL is implemented using the Switch activity, which evaluates multiple cases and executes the first one whose condition matches. This is similar to switch-case statements in programming languages. The if-then-else construct (option A) does not exist in standard BPEL, and while (option C) is used for looping, not conditional branching.

Multiple choice technology performance
  1. General: Log

  2. General: Run Logic

  3. General: Miscellaneous

  4. . General: Additional Attributes

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

In LoadRunner's runtime settings, the Log option (under General) allows you to configure logging levels including logging only when errors occur. This is a performance testing best practice to reduce log volume while capturing critical failure information. The other options (Run Logic, Miscellaneous, Additional Attributes) control different aspects of test execution but not error-specific logging behavior.

Multiple choice technology mainframe
  1. SELECT

  2. CASE

  3. ESTIMATE

  4. SEARCH

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

CASE is used in EasyTrieve instead of EVALUATE in COBOL for conditional branching based on multiple possible values. Both serve similar purposes - allowing different actions based on a variable's value - but CASE is the EasyTrieve keyword. SELECT is for file processing, ESTIMATE doesn't exist in EasyTrieve, and SEARCH is for table lookups.

Multiple choice technology mainframe
  1. TYPRUN=HOLD

  2. TYPRUN=SCAN

  3. TYPRUN=CHECK

  4. TYPRUN

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

TYPRUN=HOLD is the JCL parameter that specifically holds a job from execution until it is released by an operator. TYPRUN=SCAN checks for syntax errors without execution, TYPRUN=CHECK validates the job without running it, and TYPRUN alone is not a valid hold parameter.

Multiple choice technology web 2.0
  1. echo

  2. printf

  3. print

  4. display

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

In PHP, 'print' is a language construct that behaves like a function but doesn't require parentheses. It always returns 1, making it usable in expressions. 'echo' is also a construct but cannot be used in expressions. 'printf' is a true function that requires parentheses.

Multiple choice technology
  1. $mprjet
  2. $mpjret
  3. $mejret
  4. None of the above

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

The $mpjret variable contains the return code or status of graph execution in Ab Initio. This variable is automatically set after graph completion and can be checked to determine if the graph succeeded or failed. The other variable names ($mprjet, $mejret) are not standard Ab Initio system variables.

Multiple choice technology
  1. Is_valid()

  2. Is_null()

  3. Is_blank()

  4. Is_defined()

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

Is_null() specifically checks for NULL values in Ab Initio. Is_defined() checks whether a value is defined (not NULL). Both are valid for NULL checking, though they work oppositely. Is_valid() validates data type/format, and Is_blank() checks for empty/blank strings.

Multiple choice technology
  1. ABLOCAL() function

  2. AB_LOCAL()function

  3. AB-LOCAL() function

  4. AB_UNLOAD() function.

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

ABLOCAL() allows Ab Initio to partition database unload operations, with each partition handling a subset of data. This enables parallel processing for faster data extraction. The function name must use an underscore (ABLOCAL not AB_LOCAL or AB-LOCAL).