Computer Knowledge

Programming Languages and Compilers

2,284 Questions

Programming languages and compilers involve the rules, syntax, and semantics used to write and execute software programs. Key areas include scripting languages, object oriented concepts, and parsing algorithms like top down parsers. Practice these computer science questions to build proficiency for technical and computer knowledge exams.

Object oriented languagesScripting languagesCompilers and parsersProgramming syntax

Programming Languages and Compilers Questions

Multiple choice technology programming languages
  1. Message

  2. StackTrace

  3. Source

  4. Data

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

The StackTrace property contains the execution history of the call stack, which includes the file names and line numbers where an exception originated. Message only describes the exception, Source identifies the assembly, and Data contains custom key-value pairs.

Multiple choice technology mainframe
  1. Subscript Checking

  2. Efficiently handling Array

  3. No Such Option exists

  4. Array bound Checking

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

The SSRANGE compiler option in COBOL generates code to check whether subscripts, indexes, or reference modifiers exceed the declared boundaries of an array at runtime, ensuring array bound checking. If subscripts are out of bounds, a runtime error is raised, preventing memory corruption or access to invalid locations.

Multiple choice technology programming languages
  1. automatic

  2. enigmatic

  3. pragmatic

  4. syntactic

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

In Object-Oriented Programming, the binding between data and the operations that can be performed on it is described as 'syntactic' because it follows the syntax rules of the language. This close binding is a fundamental characteristic of OOP languages.

Multiple choice technology programming languages
  1. generates

  2. articulates

  3. manipulates

  4. eradicates

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

When programmers work with classes and objects, they create code that 'manipulates' objects: changing their state, calling their methods, and using their properties. The sentence describes the active control programmers exercise over object instances.

Multiple choice technology mainframe
  1. True

  2. False

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

In COBOL, array indexes (also called subscripts) are internal working-storage variables used to access table elements. These indexes are defined in the WORKING-STORAGE section and can be displayed using standard DISPLAY statements like other data items, but the question's wording suggests it refers to internal implementation details not directly visible.

Multiple choice technology mainframe
  1. Infinite loop

  2. Logical Error

  3. Runtime Error

  4. All the above

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

A COBOL IF statement can experience logical errors (incorrect condition formulation), runtime errors (type mismatches or invalid comparisons), and can potentially contribute to infinite loops if condition evaluation never becomes false. These represent the major categories of programming errors that can manifest within conditional logic.

Multiple choice technology mainframe
  1. for loop

  2. do while loop

  3. nested loop

  4. none of the above

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

The COBOL PERFORM loop is equivalent to a do-while loop found in languages like Java and C++. Both structures execute the loop body at least once before testing the continuation condition, making them different from while loops which test the condition before the first iteration.

Multiple choice technology mainframe
  1. Identification Division

  2. Linkage Division

  3. Data Division

  4. Procedure Division

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

The four standard divisions in a COBOL program are Identification, Environment, Data, and Procedure. Linkage Division is not one of the four main divisions; it is a special division used specifically for defining parameters passed to a program when called from another program. The correct answer is B (Linkage Division).

Multiple choice technology mainframe
  1. COmputer Basic Operating Language

  2. COmmon Business Oriented Language

  3. Common OBservation Official Language

  4. none of the above

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

COBOL stands for COmmon Business Oriented Language. It was designed in 1959 for business, finance, and administrative systems. The name directly reflects its purpose - a common language for business applications.

Multiple choice technology web technology
  1. Atlas

  2. Bullet

  3. Katmi

  4. Jolt

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

Microsoft's codename for their ASP.NET AJAX framework implementation was 'Atlas.' This was the official internal name during development before being branded as ASP.NET AJAX when released for the .NET Framework 2.0. Option A is correct. 'Bullet,' 'Katmai' (a SQL Server codename), and 'Jolt' are not associated with ASP.NET AJAX.

Multiple choice technology packaged enterprise solutions
  1. a runtime error

  2. No error is displayed

  3. a compile time error

  4. Only warning message is displayed

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

FieldDefault PeopleCode executes during runtime processing, not during compilation. If an error occurs in FieldDefault logic, it manifests as a runtime error when the code executes. Compile-time errors occur when PeopleCode is saved/compiled, not when FieldDefault logic runs.

Multiple choice technology programming languages
  1. REASSIGN

  2. REDECLARE

  3. REDEFINE

  4. None of the above

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

In languages like Software AG's Natural or COBOL (with REDEFINES), the REDEFINE statement is used to refine or restructure already declared variables or memory fields. This allows programmers to map new structures or different data types to the same physical memory space.

Multiple choice technology programming languages
  1. A programming language

  2. Extremely versatile language

  3. Restructured Extended Executor Language

  4. High-level procedural language

  5. All of the above

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

REXX (Restructured Extended Executor) is a high-level programming language that was designed to be extremely versatile. It can be used for various purposes including scripting, automation, and system interaction. Therefore, all the given descriptions are correct, making option E the right answer.

Multiple choice technology programming languages
  1. True

  2. False

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

REXX is an interpreted language, not a compiled one. The REXX interpreter reads and executes the source code directly without a compilation step. This is a key feature of REXX - you can write and test code immediately without waiting for compilation. Compiled languages like COBOL or PL/I require a compilation step to produce object code before execution. The statement that REXX requires compilation is false.