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. C# Language Code

  2. Assembly Language Code

  3. Intermediate Language which CLR understands

  4. Pseudo-code

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

C# code is compiled to Intermediate Language (IL), also called Microsoft Intermediate Language (MSIL). The CLR (Common Language Runtime) executes IL through JIT compilation to native machine code. This is different from the original C# source code, assembly language, or pseudocode.

Multiple choice technology programming languages
  1. char * (f* (*) ))

  2. char * ( f) (()());

  3. (char) (f) (());

  4. (char) (*f) ()();

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

This declares a function pointer 'f' that returns a char pointer and takes one argument - a pointer to a function taking no arguments and returning nothing. The syntax is 'char (*f)(void ()(void))' or equivalent with spacing. Option B's parenthetical structure, despite spacing oddities, best represents this complex declaration.

Multiple choice technology mainframe
  1. Restructure EXtended eXecutor language

  2. Restructured EXtending eXecutor language

  3. Restructured EXtended eXecutor language

  4. Restructured EXtended eXecution language

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

REXX (Restructured EXtended eXecutor) is a programming language developed by IBM. The official expansion emphasizes its restructured design and extended execution capabilities. It's commonly used on mainframe systems for scripting and automation.

Multiple choice technology mainframe
  1. The above exec will prompt the user for a code until the user enters the code ‘BYE’

  2. The above exec will prompt the user for a code until the user enters the code ‘EXIT’.

  3. Gives Error while Executing

  4. The above exec will prompt the user for a code until the user enters the code ‘END’.

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

The REXX script uses a Do forever loop to repeatedly prompt the user and read input using Pull code. The Pull instruction converts input to uppercase. If the input matches 'BYE', the Leave statement terminates the loop, and the program exits. Other options specify incorrect termination conditions.

Multiple choice technology
  1. a.) Ankur

  2. b.) Ank

  3. c.) Missing (character missing value)

  4. d.) ‘Ankur’

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

The DATA step assigns test = 'X'. The select statement evaluates test, and the when('X') branch executes, assigning the character string 'Ankur' to the variable Name.

Multiple choice technology mainframe
  1. deletes buffer in the stack

  2. deletes buffer and all elements of stack

  3. deletes elements of stack

  4. All the above

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

In SAP, the DROPBUF 0 command deletes the buffer and ALL elements of the stack. The argument '0' specifies deleting all buffers and stack contents. Option A is incomplete (only buffer), Option C is incomplete (only stack elements), so Option B correctly describes the complete action.

Multiple choice technology programming languages
  1. DO WHILE

  2. METHOD

  3. IF

  4. FOR

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

The COBOL PERFORM statement, especially when used with the UNTIL phrase, functions as a conditional loop. This is equivalent to DO WHILE or while loops in Java or C++. IF is a conditional branch, METHOD is a function definition, and FOR is a different loop structure.

Multiple choice technology operating systems
  1. Used to initialize some value to a variable

  2. Numeric values are set to zero, alphabetic and alphanumberic variables are set to spaces.

  3. All variables are set to spaces.

  4. None of the above

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

The INITIALIZE verb sets numeric data to zeros and alphanumeric/alphabetic data to spaces. It's a convenient way to reset data items to their default empty values without setting each one individually.

Multiple choice technology mainframe
  1. Will contain zeroes if numeric and spaces if alphabetic or alphanumeric

  2. Will contain spaces for all variables

  3. Will contain an undefined value

  4. None of the above

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

In COBOL, uninitialized variables contain whatever garbage data happens to be in their allocated memory location, making their initial value undefined. They do not automatically default to spaces or zeroes unless explicitly initialized using the VALUE clause or the INITIALIZE statement.

Multiple choice technology architecture
  1. Global

  2. Task

  3. Local

  4. Application

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

Global variables are typically application-specific in the sense that they are scoped to and persist throughout a single application instance, as opposed to system-wide or session-scoped variables. Task, Local, and Application variables represent different scoping levels.

Multiple choice technology architecture
  1. STATIC,EXIT,GLOBAL

  2. GLOBAL,STATIC,DYNAMIC

  3. EXIT,POSTSTORE,COMPLETE

  4. STATIC, TEMPORARY,DYNAMIC

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

Tasks in BTM can have three behavior types: STATIC (compiled/unchanging), TEMPORARY (runtime-created), and DYNAMIC (can change during execution). These categories define how tasks are loaded, managed, and executed within the workflow engine.