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 programming languages
  1. they can be sorted by type

  2. they can be called at runtime

  3. name functions does not exist

  4. they can be sorted by value

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

The name function in controls allows them to be called at runtime. Name functions do exist in programming contexts, and while controls can be sorted, that's not the primary purpose of the name function.

Multiple choice technology programming languages
  1. Different names

  2. Same name

  3. Both 1 and 2

  4. None of these

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

A control array in Visual Basic is a collection of controls that share the same name, allowing them to be accessed and manipulated as a group. Option B is correct - control arrays have the same name with different index values. Options A, C, and D are incorrect - controls in an array cannot have different names, and this is not an either/or situation.

Multiple choice technology programming languages
  1. ildasm

  2. clr

  3. ilasm

  4. All the above

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

IL (Intermediate Language) code can be assembled into executable code using the IL Assembler (ilasm.exe). The ildasm tool is the IL Disassembler (converts assemblies to IL text), and CLR is the runtime environment. ilasm is the correct tool for assembling IL code into executable format.

Multiple choice technology programming languages
  1. def

  2. lambda

  3. filter

  4. tokens

  5. Options 1,2 and 3

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

The question asks about important features of Python functions. def is the keyword for defining named functions, lambda creates anonymous functions, and filter() is a built-in function that applies a function to filter sequences. All three are fundamental to Python's functional programming capabilities. tokens is not a special function feature.

Multiple choice technology databases
  1. Input

  2. Variable

  3. Return

  4. Output

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

The Return port is specific to unconnected lookup and is used to return the lookup value when the lookup function is called from an expression. Connected lookups pass values through output ports directly, while unconnected lookups require a Return port to send the result back to the calling transformation via the lookup function.

Multiple choice technology mainframe
  1. There is either a JCLLIB statement for the entireJOB, or a separate one for EXEC statement, not both.

  2. A JCLLIB statement can not have a statement name.

  3. There can only be one JCLLIB statement per JOB.

  4. A JCLLIB statement must be coded before the first EXEC statement.

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

JCLLIB statements must follow specific rules: only one JCLLIB statement is allowed per JOB (C is true), and it must be coded before the first EXEC statement (D is true) because it establishes the library search order. Statement A is false - you can have JCLLIB at both JOB and EXEC level. Statement B is false - JCLLIB is a statement that can be named.

Multiple choice technology mainframe
  1. COND=(8,LE)

  2. COND=(8,GE)

  3. COND=(8,LT)

  4. COND=(8,GT)

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

In IBM JCL, COND=(value,operator) tests the return codes of prior steps. The step is bypassed (not executed) if the condition is true. To execute only if the return code is strictly less than 8, we bypass when the code is greater than or equal to 8. Thus, COND=(8,LE) (meaning bypass if 8 is less than or equal to the return code) is correct.

Multiple choice technology web technology
  1. Main Method

  2. <script></script> Block

  3. <Body>

  4. Macro

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

In Dojo 1.x, dojo.require() calls should be placed in a script block, typically after the dojo.js is loaded. This is commonly done in the main HTML file, often in the head section or at the beginning of the body. The 'Main Method' option likely refers to the main script block where Dojo modules are initialized. The key is that dojo.require must be in a script tag, not in body tags directly or in macros.