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 web technology
  1. <html:error/>

  2. <html:javaScript>

  3. <html:Validate>

  4. <html:ClientValidate>

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

The tag generates client-side JavaScript validation code based on validation rules defined in the validation framework. It enables automatic client-side validation without requiring developers to write custom JavaScript, though it's often used alongside for displaying messages.

Multiple choice technology programming languages
  1. WCF

  2. WWF

  3. LINQ

  4. WPF

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

LINQ (Language Integrated Query) was introduced in .NET Framework 3.5 as a revolutionary way to query data directly from C# and VB.NET. WCF, WPF, and WWF were all introduced in .NET 3.0, not 3.5. LINQ was the major new feature that distinguished .NET 3.5 from the previous version.

Multiple choice technology mainframe
  1. Job Controlling Language

  2. Job Controls Language

  3. Job Control Language

  4. Job Controller Language

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

JCL stands for Job Control Language, which is a scripting language used on IBM mainframe systems to define and execute jobs. The other options incorrectly use 'Controlling', 'Controls', or 'Controller' instead of 'Control'.

Multiple choice technology
  1. red orange Purple

  2. Green blue Purple

  3. red yellow Green

  4. red yellow Orange

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

The ArrayList starts with red, yellow, orange, green, blue, purple. RemoveRange(3,3) removes 3 elements starting at index 3 (0-based): green, blue, and purple. This leaves red, yellow, orange - the first three items that were added before the removal range.

Multiple choice technology programming languages
  1. A type of coffee

  2. An object-oriented programming language

  3. A Structured Programming language

  4. An interactive website

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

Java is a class-based, object-oriented programming language designed to have as few implementation dependencies as possible. Option A is a humorous reference to coffee, not technical fact. Option C is incorrect because Java is object-oriented, not procedural like C or Pascal. Option D describes web applications, not a programming language.

Multiple choice technology programming languages
  1. Java programming is derived from C++.

  2. The compiler is identical to a C++ compiler.

  3. The APIs do all the work.

  4. The Java Virtual Machine(JVM) interprets the program for the native operating system.

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

Java achieves platform independence through the JVM, which interprets compiled bytecode for each specific operating system. This 'write once, run anywhere' capability is Java's hallmark. Option A is irrelevant - derivation from C++ doesn't enable cross-platform execution. Option B is false - Java compilers are distinct from C++ compilers. Option C overstates API capabilities.

Multiple choice technology programming languages
  1. Java programming is derived from C++.

  2. The Java Virtual Machine(JVM) interprets the program for the native operating system.

  3. The compiler is identical to a C++ compiler.

  4. The APIs do all the work.

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

Java achieves platform independence through its 'write once, run anywhere' capability via the Java Virtual Machine (JVM). Java source code compiles to bytecode, which is then interpreted by the JVM specific to each operating system. The JVM acts as an intermediary, translating the bytecode into native machine instructions for the underlying platform. Option A incorrectly suggests C++ derivation, while option C is wrong because Java compilers are platform-specific, not identical to C++ compilers.

Multiple choice technology programming languages
  1. A type of coffee

  2. An object-oriented programming language

  3. A Structured Programming language

  4. An interactive website

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

Java is an object-oriented programming language that supports classes, objects, inheritance, polymorphism, and encapsulation. It was designed to be simple, secure, and platform-independent. Unlike structured programming languages, Java organizes code around objects rather than functions and procedures.

Multiple choice technology programming languages
  1. Java programming is derived from C++.

  2. The compiler is identical to a C++ compiler.

  3. The APIs do all the work.

  4. The Java Virtual Machine(JVM) interprets the program for the native operating system.

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

Java achieves platform independence through the Java Virtual Machine (JVM). The JVM interprets compiled bytecode for the specific native operating system, allowing the same Java program to run anywhere a JVM is available. This architecture-neutral design separates the compilation process from the execution platform.

Multiple choice technology programming languages
  1. Java programming is derived from C++.

  2. The Java Virtual Machine(JVM) interprets the program for the native operating system.

  3. The compiler is identical to a C++ compiler.

  4. The APIs do all the work.

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

Java's platform independence comes from the JVM. Java source code compiles to bytecode, which the JVM interprets or compiles to native machine code for each specific platform. This abstraction layer is what enables 'write once, run anywhere'. Option A is incorrect - C++ is platform-dependent. Option C is wrong - Java compilers are not identical to C++ compilers. Option D is false - APIs alone don't provide platform independence.

Multiple choice technology web technology
  1. a low-level programming language.

  2. a scripting language precompiled in the browser.

  3. a compiled scripting language.

  4. an object-oriented scripting language.

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

JavaScript is an object-oriented scripting language that runs in browsers. It's not low-level (A is wrong), not precompiled (B is wrong - it's interpreted), and not compiled (C is wrong). JavaScript supports objects, prototypes, and classes.

Multiple choice technology web technology
  1. FileUpLoad

  2. Function

  3. File

  4. Date

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

In server-side JavaScript (like Node.js or older server-side JS implementations), the File object provides file system operations. Function and Date are core language objects available on both client and server. FileUpLoad is client-side HTML form handling.

Multiple choice technology web technology
  1. The statement(s) it executes run(s) only once.

  2. It pauses the script in which it is called.

  3. clearTimeOut() won't stop its execution.

  4. The delay is measured in hundredths of a second.

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

JavaScript's setTimeout() schedules a function to run once after a specified delay. It does not pause script execution (non-blocking) and its delay is measured in milliseconds, not hundredths of a second. clearTimeout() stops it if called before execution, making the first option true.