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. .NET Threading

  2. .NET Remoting

  3. .NET RMT

  4. None of the above

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

.NET Remoting enables communication between application domains, processes, or machines. It allows objects to interact across boundaries using different transport protocols and serialization formats, making distributed applications possible.

Multiple choice technology programming languages
  1. True

  2. False

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

The statement reverses the actual relationship. CTS (Common Type System) is a component OF CLR (Common Language Runtime), not something that CLR is built into. CLR is the execution environment that includes CTS as part of its type system. The False answer correctly identifies this error.

Multiple choice technology web technology
  1. Searching directory paths

  2. Cannot find each other by any method

  3. By pointers

  4. None of the Above

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

In the .NET Framework, the Common Language Runtime (CLR) locates assemblies by searching directory paths, specifically looking in the application directory, private paths specified in configuration files, and the Global Assembly Cache (GAC).

Multiple choice technology web technology
  1. Constant

  2. Const

  3. Consta

  4. Fixed

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

Const is the VB.NET keyword for declaring constants - values that cannot be changed during program execution and must be initialized at declaration time. The other options are not valid VB.NET keywords for declaring constants.

Multiple choice technology programming languages
  1. public

  2. static

  3. void

  4. main

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

In Java, 'public', 'static', and 'void' are reserved keywords that have special meaning in the language. 'main' is NOT a reserved keyword - it's simply the name of a method that is commonly used as the entry point for Java applications, but you could technically name a method 'main' in any class.

Multiple choice technology programming languages
  1. void method1 { /* ... */ }

  2. void method2() { /* ... */ }

  3. void method3(void) { /* ... */ }

  4. method4() { /* ... */ }

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

In Java, a valid method declaration requires a return type (or void), a method name, and a parameter list enclosed in parentheses, followed by the method body. void method2() { } correctly satisfies these syntax rules.

Multiple choice technology programming languages
  1. {{}} is a valid statement block

  2. { continue; } is a valid statement block

  3. block: { break block; } is a valid statement block

  4. block: { continue block; } is a valid statement block

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

{{}} is valid - it's a nested empty block. { continue; } is invalid because continue must be inside a loop. block: { break block; } is valid - labeled break can exit any labeled block. block: { continue block; } is invalid because continue requires an enclosing loop, not just a labeled block.

Multiple choice technology web technology
  1. (D) & (E)

  2. b. (A), (D) & (E)

  3. c. (D)

  4. d. (C), (D) & (E)

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

In Java, implements and protected are keywords. NULL (all uppercase) is not a keyword (the literal is lowercase null), extended is not a keyword (the keyword is extends), and string is not a keyword (the class is String). Thus, (A), (D), and (E) are not keywords.