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 platforms and products
  1. Evaluate variable

  2. refresh variable

  3. set variable

  4. all the above

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

In programming and scripting environments, conditions are typically evaluated using an "evaluate variable" or similar conditional evaluation mechanism. The other options like 'set variable' (assignment) and 'refresh variable' (updating value) are not primarily used for condition checking. Option D 'all the above' would be incorrect since not all listed operations are used for checking conditions.

Multiple choice technology
  1. indirect function is like a pointer, which returns the value of its address

  2. indirect function indirectly refers the CPU memmory

  3. Indirect function directly referes the CPU memmory

  4. Indirect function refers the CPU and Server Memmory

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

The INDIRECT function returns the value specified by a reference string, acting like a pointer to a cell address. For example, INDIRECT("A1") returns the value in cell A1. Options B, C, and D incorrectly mention CPU memory - INDIRECT works with spreadsheet cell references, not system memory.

Multiple choice technology programming languages
  1. 1

  2. No difference

  3. 2

  4. 5

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

C++ structures have significant differences from C structures: they can have member functions, access specifiers (public/private/protected), constructors and destructors, support inheritance and polymorphism, and can be used as template parameters. These represent fundamental extensions beyond C's simpler struct model.

Multiple choice technology mainframe
  1. True

  2. False

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

Transparent Control Statements (TCS) in ECL indeed begin with @@. This is the defining characteristic that distinguishes them from regular ECL statements. The @@ prefix signals the ECL compiler to process these as control flow statements rather than standard code execution.

Multiple choice technology packaged enterprise solutions
  1. Local variables can be passed between activities

  2. You cannot view local variables and their values in the tracer tool

  3. You cannot view the contents of the parameter page in the clipboard viewer

  4. You can view parameters and their values in the tracer tool

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

Local variables are limited to the execution scope of a single activity and cannot be passed between different activities. The other statements are true: local variables cannot be traced in Tracer, and parameter pages are not visible in the clipboard viewer, making the first statement the false one.

Multiple choice technology
  1. Voids

  2. Records

  3. Vectors

  4. Unions

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

Voids represent the absence of a value or return type, not a compound data structure. Records, Vectors, and Unions are all compound types that can contain multiple elements or fields, while Void is a primitive/atomic concept.

Multiple choice technology
  1. At Compile time

  2. At Run time

  3. At Both compile time and run time

  4. Never

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

Job parameters in DataStage are set at runtime when executing a job. This allows flexibility to control job behavior dynamically without modifying the job design. Compile time is incorrect because parameter values are not fixed during compilation.

Multiple choice technology
  1. True

  2. False

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

In Ab Initio graphs, a formal parameter is a parameter defined in a graph parameter that can be overridden or overwritten by the user when the graph is executed. This allows for flexible configuration without modifying the graph itself. Actual parameters are the values passed in, while formal parameters are the placeholders that accept them.

Multiple choice technology
  1. Abort on first reject

  2. Never abort

  3. Abort on predefiend event

  4. Use limit/ramp

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

In Ab Initio components with reject handling (like Rollup or Join), the defined reject tolerances are 'Abort on first reject', 'Never abort', and 'Use limit/ramp'. 'Abort on predefined event' is NOT a standard reject tolerance option in Ab Initio components. Note: The option has a typo ('predefiend' instead of 'predefined'), but this doesn't change the answer - the option itself doesn't exist as a standard tolerance.

Multiple choice technology programming languages
  1. 1001

  2. error

  3. Head First JavaScript

  4. id

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

The Book constructor function creates objects with id and name properties using 'this'. When called with 'new Book("1001", "Head First JavaScript")', it creates an object where book.id = "1001" and book.name = "Head First JavaScript". The alert(book.id) correctly outputs "1001". Option B (error) is wrong because this is valid constructor syntax.