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

  2. onMouseOver event

  3. onRollOver event

  4. OnMouseOut event

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

The onMouseOver event fires when the mouse pointer moves over an element. For links specifically, this event can be used to trigger actions like changing link appearance, showing tooltips, or prefetching content. JavaScript uses camelCase naming for events.

Multiple choice technology web technology
  1. stringVariable.substring(subString)

  2. stringVariable.find(subString)

  3. stringVariable.indexOf(subString)

  4. stringVariable.indexOf(charAt(0))

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

The indexOf() method searches for a substring within a string and returns the index of the first occurrence, or -1 if not found. The syntax is string.indexOf(substring). Options A and B use incorrect method names (substring, find), and option D incorrectly nests charAt(0) inside indexOf.

Multiple choice technology programming languages
  1. DrScheme

  2. Sh

  3. Error : string-set! accepts 1 argument, given 3

  4. Error: string-set!: expects type <mutable string> as 1st argument, given "DrScheme"

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

string-set! modifies a string character in-place. However, string literals like "DrScheme" are immutable (cannot be changed). The function expects a mutable string, but a string literal is immutable. Hence the error about expecting a mutable string.

Multiple choice technology web 2.0
  1. Flash Player 8

  2. Flash Player 9

  3. Flash Player 10

  4. Flash Player 11

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

The FileReference.save() method was introduced in Flash Player 10 as part of the file reference API enhancements. It allows applications to save files to the user's local filesystem. Earlier versions (8 and 9) did not have this capability for security reasons.

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 web technology
  1. Master Page

  2. Page Class

  3. Session Class

  4. None of the Above

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

Page Class is correct because all ASP.NET Web Forms inherit from the System.Web.UI.Page class, which provides the base functionality for web pages. Master Page (A) is used for consistent layouts but is not the base class, Session Class (C) manages state, and 'None of the Above' is incorrect.

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 web technology
  1. Rule-Connect-SOAP

  2. Rule-Connect-WebService

  3. Connector

  4. Rule-Service-SOAP

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

In Pega PRPC, Rule-Connect-SOAP is the rule type used to connect to SOAP-based web services for fetching data. Rule-Connect-WebService is a more generic connector, but Rule-Connect-SOAP is specifically designed for SOAP services which is what the question asks about.

Multiple choice technology web technology
  1. Rule-Obj-Flow

  2. Rule-Activity

  3. Rule-Obj-Activity

  4. They are each separate rule types

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

In Pega, Router, Notify, and Utility shapes in a flow rule execute activities. All activities are instances of the Rule-Obj-Activity rule type, with their specific behavior type (like Router or Utility) specified in their Security tab.

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 security
  1. Java sand box environment provides protection against decompilation

  2. Java is compiled into ELF binaries and cannot be decompiled

  3. Java byte code can always be decompiled, code obfuscators can make the reverse engineering process more time confusing but cannot prevent it

  4. Java is difficult to decompile because the Just-In-Time compiler automatically perform string encryption by default

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

Java bytecode can be decompiled to recover readable source code. Code obfuscators make reverse engineering harder by renaming variables and adding control flow complexity, but cannot prevent decompilation entirely. The sandbox protects against runtime threats, not decompilation.