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
  1. variant

  2. voriant

  3. var

  4. varient

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

VBScript's default data type is 'variant', which can hold any type of data. The other options are misspellings: voriant (typo), var (JavaScript-like), varient (misspelled). The correct answer is A (variant).

Multiple choice
  1. lock

  2. volatile

  3. out

  4. namespace

  5. form

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

Form is not a keyword in C#. It represents a visual window or frame that can be used to place user interface controls like buttons, labels or listbox.

Multiple choice
  1. setName()

  2. isName()

  3. Name

  4. Start()

  5. getName()

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

Each thread has a Name property that we can set for the benefit of debugging. We can set the name of a thread only once. Naming a thread has its advantages while debugging an application.

Multiple choice
  1. StringBuilder represents a mutable string of characters.

  2. StringBuilder should be used when we want to make a significant number of changes to a string.

  3. If characters are added to the StringBuilder object, its length increases at runtime.

  4. We should always use StringBuilder in place of String.

  5. We can remove characters from a StringBuilder at runtime.

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

Although the StringBuilder class generally offers better performance than the String class, we should not always replace String with StringBuilder. It depends on whether we want to edit the string during the runtime or not.

Multiple choice
  1. Garbage collection

  2. Structured exception handling

  3. Allows creation of multithreaded, scalable applications

  4. Use of delegates instead of function pointers for increased type safety and security

  5. Support for ADO.NET

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

ADO.NET is an object-oriented set of libraries that allows you to interact with data sources. It cannot be said as an advantage of CLR.

Multiple choice
  1. Function definitions can be nested.

  2. A function can only return one value at a time.

  3. To return the control from middle of a function, the return clause should be used.

  4. Function calls can be nested.

  5. Functions can be called recursively.

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

We can call a function from within another function but we cannot define a function inside another. The functions must be defined independent of each other.