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
-
Internationalization
-
Core java libraries
-
User interface functionalities
-
Input/output(java.io)
C
Correct answer
Explanation
CLDC (Connected Limited Device Configuration) defines the core Java runtime environment for resource-constrained devices but does not address user interface functionalities, which are instead defined by profiles like MIDP.
-
architecture neutral and portable
-
interpreted, threaded, and static
-
robust and secure
-
simple, object oriented, and familiar
A,C,D
Correct answer
Explanation
Java was designed to be architecture-neutral (write once, run anywhere), simple and object-oriented for easier adoption, and robust/secure for reliable applications. These were among the primary design goals stated by Java's creators to improve upon C++.
C
Correct answer
Explanation
A COBOL program consists of four divisions: Identification, Environment, Data, and Procedure Divisions. Each division has a specific purpose and must appear in this order.
-
vbscript
-
macro
-
JavaScript
-
Perl
B
Correct answer
Explanation
A macro language is a programming language built directly into software applications (like VBA in Microsoft Word) to automate repetitive tasks and extend application functionality.
D
Correct answer
Explanation
PASCAL, C++, and JAVA are all well-known programming languages. APPLE is a company name (and a brand of computers/phones), not a programming language. While Apple has created programming languages (Swift), APPLE itself is not a language name.
-
same as Java
-
kind of like Java
-
different than Java
-
written part of Java
C
Correct answer
Explanation
JavaScript is a completely different language from Java with different syntax, purpose, and implementation - they share only marketing names, not technical heritage. Options A, B, and D incorrectly suggest a relationship with Java.
-
subjective
-
objective
-
evil
-
object based
D
Correct answer
Explanation
JavaScript is an object-based language where everything revolves around objects, though it uses prototype-based inheritance rather than class-based inheritance. Options A, B, and C are not valid programming paradigm descriptions for JavaScript.
-
same as Java
-
kind of like Java
-
different than Java
-
written part of Java
C
Correct answer
Explanation
JavaScript is a completely different language from Java, despite the similar name. JavaScript was originally named Mocha, then LiveScript, before being renamed as a marketing tactic to ride Java's popularity. Java is a statically-typed, compiled language while JavaScript is dynamically-typed and interpreted.
-
subjective
-
objective
-
evil
-
object based
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.
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.
-
You couldn't type APL code using the characters on an ordinary typewriter keyboard
-
As a Mac OS-only language you couldn't program in APL without using a GUI editor
-
APL had no concept of strings; text had to be processed and output one character at a time
-
As the world's only Albanian Programming Language all APL's keywords were based on Albanian
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.
-
Java
-
C++
-
Python
-
All of the above
D
Correct answer
Explanation
Python uses line breaks instead of semicolons to terminate statements. Java and C++ require semicolons. Since Python doesn't require them, 'All of the above' is correct - not all languages need semicolons.
-
Functions can take other functions as arguments and return them as results
-
Algorithms are expressed in natural mathematical terms rather than as procedural steps
-
Every function must modify some kind of state - either within the machine or in the outside world
-
Recursion is encouraged
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.
-
SQL
-
PostScript
-
AppleScript
-
Tcl
A
Correct answer
Explanation
SQL is a query language for databases, not a general-purpose programming language - it lacks features like loops, conditionals, and general computation. PostScript, AppleScript, and Tcl are all Turing-complete programming languages.
-
Subversion
-
Apache Ant
-
NetBeans
-
Spring
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.