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. [Bindable]

  2. [DefaultProperty]

  3. [DataBinding]

  4. [AutoUpdate]

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

In Adobe Flex, the [Bindable] metadata tag is used to mark a variable or property as eligible for data binding. When a property is marked as bindable, it can be used as the source or destination in data binding expressions, and changes to the property will automatically update bound destinations.

Multiple choice technology mainframe
  1. Job Cal Language

  2. Job Control Language

  3. Jobcal Control Language

  4. None of the above

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

JCL stands for Job Control Language, which is used on IBM mainframe systems (particularly z/OS and MVS) to define and execute jobs. It tells the operating system what programs to run and what resources are needed. 'Job Cal Language' and 'Jobcal Control Language' are not correct expansions.

Multiple choice technology mainframe
  1. 01 ARRAYS. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  2. 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  3. 01 ARRAYS. 05 ARRAY1 PIC X(9) OCCURS INDEX BY 10 TIMES

  4. 01 ARRAYS. 88 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

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

In COBOL, the OCCURS clause cannot be defined at the 01 level (ruling out the second option) or with level 88 condition names (ruling out the fourth). The third option uses incorrect syntax order. The first option correctly defines the table at level 05 with INDEXED BY.

Multiple choice technology
  1. uksort()

  2. arsort()

  3. ksort()

  4. All of the above

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

PHP provides multiple sorting functions for different sorting needs. uksort() sorts by keys with a custom comparison, arsort() sorts by values in descending order, and ksort() sorts by keys in ascending order. All three are valid array sorting functions in PHP, making All of the above the correct choice.

Multiple choice technology
  1. <?php>...</?>

  2. <?php…?>

  3. <script>...</script>

  4. <&>...</&>

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

PHP server-side scripts are enclosed in delimiters, which tell the PHP processor to interpret the code between them as PHP. Option A incorrectly uses and ?>, option C shows HTML script tags used for JavaScript, and option D shows invalid syntax.

Multiple choice technology web technology
  1. Diamond

  2. Java Virtual Machine

  3. Java iButton

  4. None of these

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

The Java Ring's core technology is the Java iButton, which contains a Java Virtual Machine (JVM). The JVM enables the iButton to run Java programs, making both B and C correct answers.

Multiple choice technology operating systems
  1. In high level language (C)

  2. Assembly language (low level)

  3. Machine Language

  4. All of the above

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

Unix was originally written in assembly but was rewritten in C in 1973, making it the first major OS written in a high-level language. This portability was revolutionary.

Multiple choice technology programming languages
  1. List Programming

  2. LISt Programming

  3. List Instruction Set Programming

  4. List Information Set Programming

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

LISP stands for LISt Processing, named because the language's primary data structure and fundamental building block is the linked list. It's one of the oldest high-level programming languages, designed specifically for symbolic computation and artificial intelligence research. The capitalized 'LIST' highlights its core programming paradigm.

Multiple choice technology programming languages
  1. Common Object Business Oriented Language

  2. Complete Object Business Oriented Language

  3. Common Object BASIC Oriented Language

  4. Common Oriented Business Object Language

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

COBOL stands for Common Business-Oriented Language, designed specifically for business, finance, and administrative systems. It was created to be easily readable by non-technical programmers, using English-like statements for business data processing. The language remains widely used in legacy enterprise systems today.

Multiple choice technology programming languages
  1. FORmula TRANslation

  2. FORmula TRANslator

  3. FORmal TRANslation

  4. FORmal TRANslator

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

FORTRAN stands for FORmula TRANslation, designed primarily for numerical and scientific computing. It was the first high-level programming language, created to make scientific calculations easier by translating mathematical formulas directly into executable code. The name reflects its core purpose of simplifying formula translation for scientists and engineers.

Multiple choice technology programming languages
  1. Begin All Program Symbolic Instruction Code

  2. Beginners' All-purpose Symbolic Information Code

  3. Beginners' All-purpose System Instruction Code

  4. Beginners' All-purpose Symbolic Instruction Code

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

BASIC stands for Beginners' All-purpose Symbolic Instruction Code, designed to make programming accessible to beginners while remaining versatile enough for general use. It was created to help students learn programming concepts without getting overwhelmed by complex syntax. The 'All-purpose' indicates it can handle various types of programming tasks.

Multiple choice technology programming languages
  1. C++

  2. Java

  3. SmallTalk

  4. C

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

Smalltalk (developed at Xerox PARC in the 1970s) was the first programming language to fully implement all core OOP concepts: objects, classes, inheritance, encapsulation, and polymorphism. While Simula 67 introduced some object-oriented concepts, Smalltalk was the first complete OOP system. C++ and Java came later.

Multiple choice technology
  1. int *array1 = (int *)malloc(nrows * sizeof(int *));

  2. int *array2 = (int *)malloc(nrows * sizeof(int *));

  3. int *array3 = (int *)malloc(nrows * ncolumns * sizeof(int));

  4. Any of the above.

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

All three methods are valid approaches to allocate 2D arrays dynamically. Option A allocates an array of pointers then each row separately (pointer-to-pointer). Option B appears identical to A in the garbled text but represents the same approach. Option C allocates a single contiguous block and uses arithmetic to index (flattened 2D array). Each has trade-offs in syntax and memory layout.