Computer Knowledge
Programming Languages and Compilers
1,170 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
-
UML to Java
-
UML to C
-
UML to C++
-
None of the above
A
Correct answer
Explanation
Round-trip engineering allows reversing transformations between UML and Java because Java preserves enough structure to reconstruct the UML. C lacks this expressiveness - its low-level constructs and procedural nature lose UML semantic information irreversibly. The same applies to C++.
C
Correct answer
Explanation
IBM Rational Software Architect (RSA) provides built-in UML transformations for commonly used languages and standards like C++, Java, and WSDL. SmallTalk is an older object-oriented language that is not typically supported out of the box in modern RSA versions due to its limited industry adoption today. The transformation requires additional plugins or custom configuration.
-
Low Level Language
-
High Level Language
-
Machine Level Language
-
Binary Level Language
B
Correct answer
Explanation
SAS is a high-level software suite/programming language designed for advanced analytics, data management, and business intelligence, shielding users from hardware-level complexity. Low-level, machine, and binary languages represent instructions directly executed by CPU architectures.
-
C
-
C++
-
PASCAL
-
FORTAN
-
TAL
-
All of the above
F
Correct answer
Explanation
COBOL 85 programs can invoke routines written in multiple programming languages including C, C++, Pascal, and Fortran through language interop capabilities. The TAL (Transaction Application Language) is also supported in HP NonStop environments. Therefore, all of these languages can be called from COBOL.
-
C
-
C++
-
PASCAL
-
FORTAN
-
TAL
-
All of the above
F
Correct answer
Explanation
COBOL 85 supports calling routines written in other programming languages through Language Environment (LE) and inter-language communication interfaces. This includes C (for system-level operations), C++ (through appropriate interfaces), Pascal, Fortran (misspelled as 'FORTAN' in option D), and TAL (Tandem Application Language, a system programming language for Tandem/NonStop systems). Therefore, all of these languages can be invoked from COBOL 85.
-
Job Circuit Language
-
JCL Control Language
-
Job Control Language
-
JCL Course Language
C
Correct answer
Explanation
JCL stands for Job Control Language, which is used on IBM mainframe systems to define jobs and tell the operating system what resources are needed. Option A incorrectly suggests 'Circuit' instead of 'Control'. Option B is redundant ('JCL Control Language' would repeat 'Control'). Option D incorrectly suggests 'Course' rather than 'Control'.
A
Correct answer
Explanation
COBOL (Common Business-Oriented Language) was developed in 1959 by the CODASYL committee to address business programming needs. It is classified as a high-level language because it uses English-like syntax and abstracts away low-level machine details, making it readable and maintainable.
-
c++
-
Jython
-
Java
-
smallTalk
D
Correct answer
Explanation
Smalltalk is a purely object-oriented programming language where everything (including numbers and classes) is an object, and all operations occur via message passing. C++, Java, and Jython are hybrid languages that support procedural paradigms or primitive data types.
-
Compiler
-
Reverse Engineering tool
-
Database Monitoring tool
-
Macro Analyzer
B
Correct answer
Explanation
OllyDbg is a well-known 32-bit assembler-level analyzing debugger for Microsoft Windows. It is widely used in reverse engineering, malware analysis, and software cracking because it allows binary code analysis, modification, and debugging without access to the source code.
B
Correct answer
Explanation
As a part of Microsoft's .NET Framework, the Common Language Runtime (CLR) is programming that manages the execution of programs written in any of the several supported languages, allowing them to share common object-oriented classes written in any of the languages. A program compiled for the CLR does not need a language-specific execution environment and can easily be moved to and run on any system with Windows 2000 or Windows XP .
-
.Net FCL
-
Common language runtime
-
Windows forms
-
Web forms
-
Garbage collection
A
Correct answer
Explanation
It providesthe per written code in the form of classes that are available to all of the .Net programming languages.
-
CTS
-
Execution support
-
Garbage collector
-
Web form
-
CLR
E
Correct answer
Explanation
It is an environment used for running the .Net applications that have been compiled to a MSIL.
-
$S\rightarrow AC\mid CB$
$C\rightarrow aCb\mid a\mid b$
$A\rightarrow aA\mid \varepsilon$
$B\rightarrow Bb\mid \varepsilon$
-
$S\rightarrow aS\mid Sb \mid a\mid b$
-
$S\rightarrow AC\mid CB$
$C\rightarrow aCb\mid \varepsilon$
$A\rightarrow aA\mid \varepsilon$
$B\rightarrow Bb\mid \varepsilon$
-
$S\rightarrow AC\mid CB$
$C\rightarrow aCb\mid \varepsilon$
$A\rightarrow aA\mid a$
$B\rightarrow Bb\mid b$
-
Recursive descent parser.
-
Operator precedence parser
-
An LR(k) parser.
-
An LALR(k) parser.