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 mainframe
  1. Sequential

  2. Dynamic

  3. Relative

  4. Index

  5. All the above

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

In COBOL, the START statement requires DYNAMIC access mode for indexed or relative files. Dynamic access allows both sequential and random record access, which is necessary because START positions the file for subsequent sequential read operations based on a key value.

Multiple choice technology mainframe
  1. 01 ARRAYS. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  2. 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  3. 01 ARRAYS. 05 ARRAY1 PIC X(9) OCCURS INDEXE BY 10 TIMES

  4. 01 ARRAYS. 88 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

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

Option B shows correct COBOL array syntax: the data name at level 01 with PIC clause, OCCURS clause specifying the count, and INDEXED BY clause for the index variable. Option A unnecessarily nests under a group, Option C has 'INDEXE' typo, and Option D incorrectly uses level 88 (reserved for condition names).

Multiple choice technology web technology
  1. 66

  2. 77

  3. 88

  4. 01

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

Level 66 is specifically designated for the RENAMES clause in COBOL. This clause allows you to give an alternative name to a contiguous group of elementary items or to reorganize existing data items. Level 77 is for independent items, 88 for condition names, and 01 for record definitions.

Multiple choice technology mainframe
  1. Serial Search

  2. Binary search

  3. Tree Search

  4. SQL Search

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

COBOL's SEARCH ALL verb implements a binary search algorithm. Binary search requires the table to be sorted and repeatedly divides the search interval in half, achieving O(log n) time complexity.

Multiple choice technology security
  1. Ounce

  2. WebInspect

  3. IBM RAD

  4. None of the above

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

Ounce (now IBM Security AppScan Source) is a static application security testing (SAST) tool that analyzes source code for security vulnerabilities. WebInspect is a dynamic testing tool, IBM RAD is a development IDE, making Ounce the correct choice for static code analysis.

Multiple choice technology programming languages
  1. Byte Code

  2. Firewall

  3. Tetra Code

  4. View Code

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

Java achieves cross-platform compatibility by compiling source code into bytecode, which is an intermediate representation. This bytecode can run on any device with a Java Virtual Machine (JVM), enabling the 'write once, run anywhere' capability. The JVM translates bytecode into machine-specific instructions at runtime.

Multiple choice technology programming languages
  1. Resultset

  2. Prepared Statement

  3. Statement

  4. Number of rows retrieved

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

The executeUpdate(String sql) method in JDBC returns an int representing the number of rows affected by the INSERT, UPDATE, or DELETE operation. It does NOT return ResultSet (use executeQuery() for that), PreparedStatement (that's what you call the method ON), or Statement objects.

Multiple choice technology mainframe
  1. 4

  2. 5

  3. 6

  4. 1

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

The PERFORM VARYING loop iterates with C starting at 1 and incrementing by 1 until C equals 6. Since the condition UNTIL C = 6 is checked before each iteration, the loop runs for C = 1, 2, 3, 4, 5 (5 iterations), and stops when C becomes 6. Therefore RESULT = 5.

Multiple choice technology programming languages
  1. Skype

  2. Toad

  3. PL/SQL Developer

  4. MySQL

  5. MySQL Administrator

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

MySQL is a database management system, not a Delphi application. Skype (original Windows version), Toad (database tool), and PL/SQL Developer (Oracle IDE) were built using Delphi/Object Pascal. MySQL Administrator was also written in Delphi. MySQL itself is C/C++ software, making it the correct 'odd one out' for applications NOT written in Delphi.

Multiple choice technology programming languages
  1. Embarcadero

  2. CodeGear

  3. Inprise

  4. Borland

  5. Pascal

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

Pascal is a programming language, while Embarcadero, CodeGear, Inprise, and Borland are all company names that owned Delphi at different times in its corporate history. Borland created Delphi, later spun off as CodeGear, acquired by Embarcadero; Inprise was Borland's brief name change. Pascal is the linguistic odd one.

Multiple choice technology programming languages
  1. DataTable

  2. DataView

  3. DataRelation

  4. DataSet

  5. None of these

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

ADO.NET has two main architecture models: connected and disconnected. DataSet, DataTable, DataView, and DataRelation are all part of the disconnected architecture - they work with data cached in memory without maintaining active database connections. Connected architecture uses objects like Connection, Command, and DataReader that require active database connections to the database server. Since all options listed are disconnected components, the correct answer is None of these.