Computer Knowledge

Programming Languages and Compilers

1,170 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
  1. Output Control Work

  2. Output Control Word

  3. Output Common Word

  4. Output Common Work

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

In microprocessor and I/O systems, OCW stands for Output Control Word, which is used to control the operation of output devices or ports. The Output Control Word configures how the system interfaces with external hardware.

Multiple choice technology programming languages
  1. JavaScript

  2. LiveScript

  3. WireScript

  4. ECMAScript

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

JavaScript was originally named LiveScript when it was developed by Netscape. It was renamed to JavaScript as a marketing move to capitalize on Java's popularity. ECMAScript is the official standard name, not the original name. WireScript is not related.

Multiple choice technology programming languages
  1. Open source general purpose

  2. Proprietary general purpose

  3. Open source special purpose

  4. Proprietary special purpose

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

PHP is an open source, general-purpose scripting language specifically designed for web development. It can be embedded directly into HTML code, making it ideal for creating dynamic web applications. The 'open source general purpose' description accurately captures both its licensing model and its versatility beyond just web development.

Multiple choice technology web technology
  1. RMT

  2. CLR

  3. JIT

  4. MSIL

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

CLR (Common Language Runtime) is the correct answer because it is the runtime environment provided by the .NET Framework that manages code execution, memory management, and other services. RMT (A) is not a .NET component, JIT (C) is a compiler that works within CLR, and MSIL (D) is the intermediate language code, not the runtime environment.

Multiple choice technology programming languages
  1. True

  2. False

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

True is correct because C++ is a compiled language that converts source code directly to machine code, which the operating system can execute directly. Unlike interpreted languages or languages that compile to bytecode (like Java), C++ produces native machine code that runs without a runtime interpreter.

Multiple choice technology security
  1. Pure C++

  2. Any file type on a web server

  3. Pure C#

  4. Pure Java

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

C and C++ allow direct memory access and lack automatic bounds checking, making them vulnerable to buffer overflows. Languages like Java and C# have built-in bounds checking and type safety that prevent buffer overflows in normal usage.

Multiple choice technology programming languages
  1. Compiled Language

  2. Interpretive Language

  3. Machine Language

  4. All the above

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

Perl is historically and primarily classified as an interpretive (interpreted) language, where scripts are compiled into an internal representation and executed by the Perl interpreter, rather than compiled directly to native machine code beforehand.

Multiple choice technology web technology
  1. Java based

  2. C++ based

  3. Event based

  4. C# based

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

Flash (ActionScript) programming is fundamentally event-based, responding to user actions like clicks, key presses, and timeline events. While ActionScript has ECMAScript roots (like JavaScript), it is not based on Java, C++, or C#. The event-driven architecture is central to Flash interactive applications.

Multiple choice technology web technology
  1. Compiled and Procedural Programming Language

  2. Interpreted and Object Oriented Programming Language

  3. Interpreted and Procedural Programming language

  4. Compiled and Object Oriented Programming Language

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

Ruby is an interpreted language, meaning code is executed directly without prior compilation, and it's purely object-oriented where everything (including numbers and booleans) is an object. This combination allows for dynamic typing and flexible programming styles.

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 (Ounce Labs) is a commercial static code analyzer that identifies security vulnerabilities in source code before deployment. It analyzes code paths to find potential security issues. WebInspect is a dynamic analysis tool, IBM RAD is an IDE, making Ounce the correct static analyzer choice.

Multiple choice technology security
  1. Pure C++

  2. Any file type on a web server

  3. Pure C#

  4. Pure Java

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

Buffer overflows occur in languages that allow direct memory manipulation and lack bounds checking, like C and C++. They happen when a program writes more data to a buffer than it can hold, overflowing into adjacent memory. Java (D) and C# (C) are managed languages with automatic bounds checking that prevent buffer overflows. 'Any file type on a web server' (B) is nonsensical in this context.

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