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

  2. objective

  3. evil

  4. object based

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

JavaScript is an object-based language, meaning it uses objects as its fundamental building blocks but doesn't have classical inheritance. Unlike purely objective languages like C++, it uses prototype-based inheritance. It's not subjective or evil in any technical sense.

Multiple choice technology programming languages
  1. Precede it with two forward slashes, i.e. '//'

  2. Precede it with an asterisk and a forward slash, i.e. '*/'

  3. Precede it with an asterisk, i.e. '*'

  4. Precede it with a forward slash and an asterisk, i.e. '/*'

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

Single-line comments in JavaScript start with two forward slashes (//). Option B describes the end of a multi-line comment (/), option C is just multiplication, and option D is the start of a multi-line comment (/), which can span multiple lines but isn't used for single lines.

Multiple choice technology mainframe
  1. DO UNTIL

  2. DO WHILE

  3. ITERATE

  4. Wrong question!

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

ITERATE is a REXX command that skips the remaining instructions in the current DO loop iteration and immediately proceeds to the next iteration. DO UNTIL and DO WHILE are loop control structures that determine when the loop exits, not what skips within an iteration. Option D is clearly invalid.

Multiple choice technology mainframe
  1. using DEFINE

  2. using DECLARE

  3. Cant use alphanumeric variable in REXX

  4. No need to define. REXX will deal them.

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

REXX is typeless and dynamically typed - variables need no declaration and automatically handle alphanumeric values. DEFINE and DECLARE aren't REXX keywords for variable declaration.

Multiple choice technology web technology
  1. ASP.NET applications run without a Web Server

  2. ASP+ and ASP.NET refer to the same thing

  3. ASP.NET is a major upgrade over ASP

  4. None of the Above

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

ASP.NET applications require a web server, such as IIS (Internet Information Services), to process requests and host the application, making the statement that they run without a web server false.

Multiple choice technology programming languages
  1. C#

  2. Java

  3. Objective-C

  4. C++

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

Java eliminated C-style direct pointer manipulation and pointer arithmetic to improve memory safety and security, relying instead on managed object references and automatic garbage collection.

Multiple choice technology programming languages
  1. You couldn't type APL code using the characters on an ordinary typewriter keyboard

  2. As a Mac OS-only language you couldn't program in APL without using a GUI editor

  3. APL had no concept of strings; text had to be processed and output one character at a time

  4. As the world's only Albanian Programming Language all APL's keywords were based on Albanian

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

APL used a special character set with symbols that couldn't be typed on standard keyboards, requiring specialized input equipment. This made it impractical as keyboards standardized. Option B is wrong (APL predates Mac OS), C is wrong (APL handled strings), and D is a joke.

Multiple choice technology programming languages
  1. Functions can take other functions as arguments and return them as results

  2. Algorithms are expressed in natural mathematical terms rather than as procedural steps

  3. Every function must modify some kind of state - either within the machine or in the outside world

  4. Recursion is encouraged

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

Functional programming emphasizes pure functions with no side effects - they don't modify state (option C is false, thus 'NOT a characteristic'). Options A (higher-order functions), B (mathematical style), and D (recursion) are all true characteristics.

Multiple choice technology programming languages
  1. Subversion

  2. Apache Ant

  3. NetBeans

  4. Spring

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

NetBeans is a comprehensive IDE for Java development, similar to how Visual Studio serves C# developers. It provides code editing, debugging, and project management features. Subversion is version control, Apache Ant is a build tool, and Spring is a framework - none are full IDEs.

Multiple choice technology programming languages
  1. ActionScript

  2. AppleScript

  3. PostScript

  4. VBScript

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

ActionScript is a dialect of ECMAScript, the standardized scripting language specification. JavaScript is the most well-known ECMAScript implementation, but ActionScript (used in Adobe Flash) was also built on the ECMAScript standard. The other options are not ECMAScript dialects: AppleScript is Apple's native scripting language, PostScript is a page description language, and VBScript is Microsoft's Visual Basic scripting language.