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 web technology
  1. MSIL

  2. CLS

  3. CLR

  4. CTS

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

The CLR (Common Language Runtime) is where .NET code actually executes. It provides services like memory management, security, and JIT compilation. MSIL (Microsoft Intermediate Language) is the compiled code format, CLS (Common Language Specification) defines language interoperability rules, and CTS (Common Type System) defines type system rules - none of these execute code directly.

Multiple choice technology programming languages
  1. It offers option of sharing local variables and better run time efficiency

  2. Provides benefit of automatic recompilation

  3. It is processed during translation and compilation and does not impose any restrictions on output buffering

  4. none of the above

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

The JSP include directive (<%@ include file="..." %>) merges the content of the target file into the calling page during translation. This allows sharing of local variables and offers better runtime efficiency compared to dynamic inclusion.

Multiple choice technology programming languages
  1. return

  2. break

  3. goto

  4. continue

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

Java has 'goto' as a reserved keyword but it is not implemented as a branching statement - it has no functionality. 'return', 'break', and 'continue' are all valid branching statements that control flow. The question asks which is NOT a branching statement, making 'goto' (option C) the correct answer despite being syntactically reserved but unusable.

Multiple choice technology mainframe
  1. DATA STACK

  2. QUEUE

  3. COMPOUND VARIABLE

  4. SYMBOLIC VARIABLE

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

In REXX, the DATA STACK can be used for file I/O operations - you can PUSH lines to write to a file and PULL/QUEUE to read from a file. QUEUE is used for stack manipulation but not direct file I/O. COMPOUND and SYMBOLIC variables are data types, not I/O mechanisms.

Multiple choice technology mainframe
  1. EXECUTE

  2. INTERPRET

  3. RUN

  4. CALL

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

INTERPRET is the correct REXX instruction that dynamically executes a string containing REXX code. EXECUTE, RUN, and CALL are not valid REXX instructions - CALL invokes subroutines but doesn't interpret code strings. The code 'DO 3; SAY "HELLO THERE!"; END' would print the message three times.

Multiple choice technology mainframe
  1. Subroutine should start with this instruction

  2. To convert all the local variables in the subroutine as global variables

  3. To convert all the variables used in subroutine as local variables

  4. Function should start with this instrucion

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

The PROCEDURE instruction in REXX starts an internal subroutine and protects its variables by making them local to that subroutine. Without PROCEDURE, variables in a subroutine are global. PROCEDURE does not convert global variables to local - it creates a new local variable scope.

Multiple choice technology programming languages
  1. Python is faster than C

  2. Python is faster than C++

  3. Python is slower than C

  4. None of the above

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

Python is an interpreted language that translates code at runtime, while C is a compiled language that translates to machine code beforehand. This compilation step makes C significantly faster than Python for most operations.

Multiple choice technology databases
  1. get+find

  2. find

  3. find+get

  4. none of the above

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

In IDMS DMS database operations, a Fetch operation is conceptually equivalent to 'find+get'. First you find (locate) the record, then you get (retrieve) it. This two-step process characterizes the fetch operation in DMS databases. Option A has the order wrong, option B is incomplete, and option D is incorrect.

Multiple choice technology platforms and products
  1. True

  2. False

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

In vi editor, named registers (buffers) like 'a', 'b', etc. can be specified before deletion, change, yank, or put operations by prefixing the register name in double quotes. For example, 'adw' deletes a word into register 'a', and 'ap' puts contents of register 'a'. This is a core feature of vi's text manipulation system.

Multiple choice technology enterprise content management
  1. True

  2. False

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

For a REPEAT operation to execute continuously until the repeat condition becomes false (not remains true), the count parameter must be set to -1. A -1 value indicates unlimited repetition, allowing the loop to continue executing until the condition changes.