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

  2. HP

  3. Intel

  4. Borland

Reveal answer Fill a bubble to check yourself
A,B,C Correct answer
Explanation

When C# was submitted as an ECMA standard in 2000, it was co-sponsored by Microsoft (the creator), HP, and Intel. These companies jointly submitted the specifications to ECMA International for standardization. Borland was not a co-sponsor of the initial C# specification.

Multiple choice technology programming languages
  1. Thread.GetData

  2. Monitor.Pulse

  3. Thread.SpinWait

  4. Monitor.Wait

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

Monitor.Pulse notifies a single waiting thread in the waiting queue that the locked object's state has changed. The waiting thread can then re-acquire the lock and proceed. Thread.GetData retrieves thread-local data, Thread.SpinWait is a busy-wait mechanism, and Monitor.Wait releases the lock and puts the thread in the waiting queue.

Multiple choice technology programming languages
  1. Value

  2. Default

  3. Object

  4. Param

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

In C# and VB.NET, the implicit parameter name in a property setter is 'value'. When you write set { _field = value; }, 'value' automatically contains the value being assigned to the property. This is a language-defined implicit parameter name that you don't declare - it's available by default within the set accessor.

Multiple choice technology programming languages
  1. SortedList

  2. ArrayList

  3. ListDictionary

  4. HashTable

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

HashTable is the .NET collection class designed specifically for storing and retrieving elements using unique key-value pairs. Unlike ArrayList which uses integer indices, HashTable allows you to access any value directly by its unique key, providing fast lookups through hashing. SortedList also supports key access but maintains sorted order, while ListDictionary is optimized for small collections.

Multiple choice technology performance
  1. C

  2. Perl

  3. Shell Script

  4. C++

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

MRTG (Multi Router Traffic Grapher) was written by Tobias Oetiker using the Perl programming language. Perl was chosen for its excellent text processing capabilities and cross-platform support. This choice made MRTG portable across different UNIX variants and other operating systems. The Perl source code can be run on any system with a Perl interpreter.

Multiple choice technology web technology
  1. RPC/encoded

  2. RPC/document

  3. RPC/literal

  4. Document/encoded

  5. Document/literal,

Reveal answer Fill a bubble to check yourself
A,C,D,E Correct answer
Explanation

WSDL defines five valid SOAP binding style/use combinations. Document/literal and RPC/literal are WS-I compliant and recommended. RPC/encoded was common in early SOAP but is now deprecated. Document/encoded is technically valid though rarely used. RPC/document is not a standard WSDL combination.

Multiple choice technology web technology
  1. Header

  2. Envelope

  3. Body

  4. Fault is the Root Element

  5. None of the above

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

According to SOAP specification, a Fault element must appear within the Body element of the SOAP message. It cannot be in Header, Envelope (the root), or be a root element itself. The Fault element carries error or fault information from the endpoint.

Multiple choice technology web technology
  1. 1) A SOAP message MUST NOT use the SOAP Encoding namespace

  2. 1) A SOAP message MUST use the SOAP Envelope namespace

  3. 2) A SOAP message MUST contain XML Processing Instructions

  4. 2) A SOAP message MUST NOT contain a DTD reference

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

SOAP messages MUST use the SOAP Envelope namespace (xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/') as it defines the message structure. They MUST NOT contain DTD references because SOAP is designed to work with XML parsers that may not validate against DTDs. SOAP Encoding namespace is optional (used with rpc/encoded style).

Multiple choice technology programming languages
  1. Binary Language

  2. Machine Language

  3. Primary Language

  4. Assembly Language

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

First-generation programming languages are machine languages, which consist of binary code (0s and 1s) that can be directly executed by the CPU. Binary Language refers to the binary format itself rather than the language category. Assembly Language is second-generation, and Primary Language is not a standard classification.

Multiple choice technology programming languages
  1. Assembly

  2. PASCAL

  3. COBOL

  4. BASIC

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

BASIC is traditionally implemented with an interpreter, allowing for interactive programming and immediate execution of commands. Assembly language uses assemblers (not interpreters), while Pascal and COBOL are primarily compiled languages. The interpreted nature of BASIC made it popular for educational purposes and rapid prototyping.

Multiple choice technology programming languages
  1. Business

  2. Scientific

  3. Simulation

  4. All of the above

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

COBOL (Common Business-Oriented Language) was specifically designed for business applications, particularly for data processing tasks in finance, administration, and government sectors. It excels at handling large volumes of data with fixed record formats. It was not designed for scientific computing or simulation purposes.

Multiple choice technology mainframe
  1. COmmon Business Oriented Language

  2. Common OBservation Official Language

  3. COmputer Basic Operating Language

  4. None of the above

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

COBOL stands for COmmon Business Oriented Language. It was designed in 1959 by CODASYL for business data processing, emphasizing readability and ease of use in business applications, making the other options incorrect.