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

  2. one

  3. three

  4. four

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

In RPG (Report Program Generator), only one file can be designated as the primary file ('P' in file description specifications) to drive the program's cycle. While multiple secondary or full-procedural files are allowed, only one primary file is permitted.

Multiple choice technology
  1. Faster than a program written in a shell script language, but slower than a program in a native language such as C

  2. Slower than programs in shell script languages, but with modern computers that isn't a problem

  3. About the same speed as a program written in a native language such as C, and much faster than a shell script

  4. Faster than anything else on the same computer

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

Java bytecode runs on JVM (interpreted/JIT-compiled), placing its performance between shell scripts (slow interpreted) and native languages like C (compiled to machine code).

Multiple choice technology
  1. A widget set for programmers

  2. A programming language

  3. A set of programmer's libraries

  4. A network service

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

Java is fundamentally a high-level, class-based, object-oriented programming language designed for platform independence.

Multiple choice technology
  1. Java is an object-oriented language.

  2. Java is a language that is network-aware.

  3. Java is a language which gives you great freedom in how you write your program.

  4. Java is a portable language.

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

Java enforces strict rules (strong typing, no pointers, garbage collection, OOP structure) that constrain how you write code - less freedom than C/C++ but safer and more maintainable.

Multiple choice technology mainframe
  1. 1

  2. 2

  3. There is no limit

  4. COBOL if statements are not used to compare variable values

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

A COBOL IF statement evaluates a single condition at a time. While you can combine conditions using AND/OR connectors, the fundamental IF construct makes one comparison decision. For multiple independent comparisons, you need nested IFs.

Multiple choice technology mainframe
  1. Infinite loop

  2. Logical Error

  3. Runtime Error

  4. All of the above

  5. None of the above

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

COBOL IF statements can encounter logical errors (wrong condition logic), runtime errors (invalid data type comparison), and infinite loops (when combined with PERFORM or if condition never becomes false due to state changes). All three error types are possible in IF-based control flow.

Multiple choice technology mainframe
  1. For loop

  2. Do-While loop

  3. Method

  4. None of the Above

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

COBOL's PERFORM...UNTIL structure is analogous to a do-while loop in languages like Java and C++ - it executes the code block, then checks the condition, repeating until the condition becomes true. It's not a for loop (fixed iteration) or a method call.

Multiple choice technology mainframe
  1. Use a standard perform statement

  2. Use an in line perform

  3. Skillful use of the COBOL reserved word "AFTER"

  4. This is not possible in COBOL

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

The AFTER clause in COBOL PERFORM statements allows condition checking after initial execution, enabling the loop to run once before evaluation. Standard PERFORM checks first, inline PERFORM is about code placement, and the functionality is definitely possible in COBOL.

Multiple choice technology mainframe
  1. Exits the statement

  2. Executes the function

  3. Exits the Program

  4. Executes the If statement again

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

When an IF condition evaluates to true, the first action is executing the code or function within the IF block. Only after execution does flow continue to any ELSE or statement exit. It doesn't exit immediately, exit the program, or re-execute.

Multiple choice technology programming languages
  1. Common Language Specification

  2. Common Language Runtime

  3. Base Class Library

  4. None

  5. All the Above

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

CTS (Common Type System) is contained in the Common Language Runtime (CLR), which is the execution engine of .NET. It is not contained in CLS, BCL, or other components.

Multiple choice technology operating systems
  1. C ,Java

  2. C,C++,Java

  3. Java,linux

  4. Java ,Pearl

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

Android's architecture uses multiple languages: Java for application development and the Android framework, C++ for native code and libraries (via NDK), and C for the Linux kernel itself. This layered approach balances performance with developer productivity.

Multiple choice technology web technology
  1. Rock Band

  2. Programming Language

  3. Web Browser

  4. Java Framework

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

Mosaic was a pioneering web browser released in 1993 by the National Center for Supercomputing Applications (NCSA). It was instrumental in popularizing the World Wide Web and helped establish the web as we know it today by making it accessible to non-technical users through its graphical interface.

Multiple choice technology mainframe
  1. Job Centre Language

  2. Job Control Language

  3. Job Comitte Language

  4. Job Control Limit

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

JCL stands for Job Control Language, which is used on IBM mainframe systems to tell the operating system what program to run and what resources to allocate. It's a scripting language for batch job processing. Job Centre Language, Job Comitte Language, and Job Control Limit are incorrect expansions.