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. Send Activity

  2. Web Service Input Activity

  3. Receive Activity

  4. None of These

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

In .NET Framework 3.5, Windows Workflow Foundation (WF) introduced the Receive activity as part of the Workflow Service API. This activity allows workflows to be exposed as WCF services, enabling the workflow to receive and process messages from service clients. The Send activity complements it for sending messages, but Receive is specifically for exposing workflows as services.

Multiple choice technology web technology
  1. a. BAIXXX_Client

  2. b. BAIXXX_Interfaces

  3. c.BAIXXX_mplementation

  4. d. BSIXXX_Client

  5. e. BSIXXX_Interfaces

  6. f. BSIXXX_Implementation

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

To resolve compile-time errors in the BAIXXX_WEB project, you need to add BAIXXX_Client and BAIXXX_Interfaces as dependencies. The Client component provides necessary client-side functionality, while Interfaces defines the contracts and APIs. The Implementation component is not typically required at compile-time for the web layer. BSIXXX components are unrelated and would introduce incorrect dependencies.

Multiple choice technology web technology
  1. a. JDK 1.3

  2. b. JDK 1.4

  3. c. JDK 5.0

  4. d. JDK 6.0

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

The question asks which JDK versions are used in IB (likely an Investment Banking system), and the correct answers are JDK 1.3 and JDK 5.0. Legacy financial systems often run on older JDK versions for stability and compatibility reasons. JDK 1.4 and 6.0 are marked as incorrect, suggesting this particular environment doesn't use those versions.

Multiple choice technology programming languages
  1. doPost

  2. doGet

  3. Get

  4. Post

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

The doPost() method is used for sending sensitive data because it sends data in the request body (not visible in URL), has no size limit, and is more secure than doGet(). doGet() exposes parameters in the URL, making it unsuitable for sensitive information.

Multiple choice technology mainframe
  1. Division

  2. Paragraph

  3. Clause

  4. Character

  5. Program

  6. All the above

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

COBOL programs are hierarchically structured with multiple organizational levels. A Program contains Divisions, Divisions contain Sections, Sections contain Paragraphs, Paragraphs contain Sentences, Sentences contain Statements, and Statements contain Clauses. All these components (Division, Paragraph, Clause, Character, Program) are valid parts of COBOL structure.

Multiple choice technology mainframe
  1. Syntactically valid combination of words and clauses

  2. Sequence of one or more statements terminated by period

  3. Words and characters specifying attribute of entry

  4. Syntactically valid combination of words

  5. Sequence of one or more statements terminated by comma

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

In COBOL, a Clause is the lowest-level syntactic unit that specifies attributes or characteristics of an entry. Clauses consist of words and characters that define properties like data types, picture clauses, or usage clauses. They are not complete statements (terminated by periods) but rather descriptive elements within entries.

Multiple choice technology mainframe
  1. RENAME

  2. REDEFINE

  3. CONDITION NAMES

  4. NONE

  5. ALL

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

In COBOL, the LEVEL-66 clause is the RENAME clause. It allows you to regroup existing data items under an alternative name for easier reference. RENAME (level 66) is different from REDEFINES (level 01-49) and CONDITION NAMES (level 88).

Multiple choice technology mainframe
  1. Numeric

  2. Alphabetic

  3. Alpha-numeric

  4. Numeric Edited

  5. 01-03

  6. ALL

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

COBOL supports various data categories including numeric, alphabetic, alphanumeric, and numeric-edited fields, which are defined using different PICTURE clause symbols. Since all these options represent valid data types in COBOL, the correct selection is 'ALL'.

Multiple choice technology mainframe
  1. True

  2. False

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

SEARCH ALL requires the table to be arranged in a specific order (ASCENDING or DESCENDING) as defined by the KEY clause. For predictable results, the key must uniquely identify each table entry. If duplicates exist, SEARCH ALL may return any matching entry, making the result unpredictable. This requirement is due to the binary search algorithm used.

Multiple choice technology mainframe
  1. Identification Division

  2. Environment Division

  3. Data Division

  4. Procedure Division

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

Only the Identification Division is mandatory in every COBOL program. It contains the program identifier and is required for compilation. Environment, Data, and Procedure Divisions may be omitted in minimal programs.

Multiple choice technology mainframe
  1. Identification Division

  2. Environment Division

  3. Data Division

  4. Procedure Division

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

Only the Identification Division is mandatory in every COBOL program. It contains the program identifier and is required for compilation. Environment, Data, and Procedure Divisions may be omitted in minimal programs.

Multiple choice technology mainframe
  1. True

  2. False

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

SEARCH ALL uses a binary search algorithm, which requires the table to be sorted in a known order (ASCENDING or DESCENDING). Additionally, for binary search to work correctly and predictably, each key value must be unique so the search can definitively locate a single occurrence. Option A correctly states both requirements.

Multiple choice technology programming languages
  1. Custom Attributes

  2. Funtional Attributes

  3. Predefined Attributes

  4. Both A & C

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

.NET supports both Custom Attributes (user-defined) and Predefined Attributes (built-in like [Serializable], [Obsolete]). Functional Attributes do not exist as a category in .NET.