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
-
Interpreter
-
Compiler
-
Byte code file
-
Class file
B
Correct answer
Explanation
JCL (Job Control Language) is NOT a programming language - it's a scripting language used to tell the operating system how to run a job. JCL defines job steps, allocates resources (like data sets and CPU time), and specifies what programs to run. Unlike programming languages, it doesn't implement algorithms or data structures - it's a control and job submission language.
-
.EXE format
-
Common Intermediate Language (CIL)
-
JAVA
-
ByteCode
B
Correct answer
Explanation
C# source code is compiled by the compiler into Common Intermediate Language (CIL), which is a CPU-independent instruction set. This intermediate format is later JIT-compiled into native machine code at runtime.
-
Modular programming
-
Aspect-oriented programming
-
Object-oriented programming
-
Reflective programming
C
Correct answer
Explanation
VB6 was primarily a procedural language with limited OOP support. VB.NET is built entirely on object-oriented programming (classes, inheritance, polymorphism, encapsulation). Understanding OOP is essential for VB.NET development and makes migration easier - you'll recognize which patterns to preserve and which need redesign.
D
Correct answer
Explanation
LINQ (Language Integrated Query) is the unified programming model for querying objects, databases, and XML in .NET. The other options are Microsoft code names: Rosario (future Team System), Orcas (VS 2008), Yukon (SQL Server 2005). Only LINQ is the actual technology name for query integration across data sources.
-
DTD
-
JDBC Connection
-
SQL Variant to generate
-
Mapping files
-
Size of the database
A,B,C,D
Correct answer
Explanation
hibernate.cfg.xml configures DTD references, JDBC connection settings (url, driver, credentials), the SQL Dialect, and mapping files. It does not contain tags specifying the physical size of the database on disk.
-
Create HQL Query
-
Execute query to get list containing Java objects
-
Load the Hibernate configuration file and create configuration object
-
Create session from configuration object
-
Get one session from the session factory
-
PICTURE
-
ON OVERFLOW
-
VALUE
-
USAGE
B
Correct answer
Explanation
ON OVERFLOW is an exception handling clause used in procedure division statements like ARITHMETIC verbs, not in data item definitions. PICTURE, VALUE, and USAGE are all valid data clause definitions in the DATA DIVISION.
-
Display
-
COMP
-
COMP-3
-
COMP-2
A
Correct answer
Explanation
The INSPECT TALLYING verb requires the identifier being tallied to have DISPLAY or DISPLAY-1 usage format. Computational formats like COMP (binary), COMP-3 (packed decimal), and COMP-2 (floating point) are invalid for TALLYING operations.
-
ilasm
-
ildasm
-
clr
-
None of the above
A
Correct answer
Explanation
ilasm (IL Assembler) converts IL (Intermediate Language) code into executable code. ildasm (option B) is the disassembler that converts executable code to IL. The CLR (option C) is the runtime environment that executes IL, not an assembler. ilasm is the correct tool for assembling IL programs.
-
Prints 300 as the output
-
Prints āCā
-
Compiler Error
-
RunTime Error
D
Correct answer
Explanation
Byte variables in VB.NET have a range of 0-255. When A=200 and B=100 are added, the result is 300, which exceeds the maximum value a Byte can hold. This causes an overflow exception at runtime, not during compilation.
-
DATAGEN
-
JCLGEN
-
DCLGEN
-
DBLGEN
C
Correct answer
Explanation
DCLGEN (Declaration Generator) is an IBM DB2 utility that generates COBOL or PL/I data structure declarations that match DB2 table definitions. It creates host variable declarations compatible with the table's column definitions, ensuring type safety and reducing manual coding errors when working with embedded SQL in COBOL programs.
-
SFLSIZ > SFLPAG.
-
SFLSIZ < SFLPAG.
-
SFLSIZ = SFLPAG.
-
SFLSIZ <> SFLPAG.
A
Correct answer
Explanation
For dynamic subfile expansion, SFLSIZ must be greater than SFLPAG. SFLPAG defines how many records load per page, while SFLSIZ is the total capacity. When SFLSIZ > SFLPAG, the subfile can grow beyond one page as needed. Setting them equal creates a fixed-size subfile.
-
ENDPGM
-
STRPGM
-
With the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program.
-
STRDBG
C
Correct answer
Explanation
In CL programs, end-of-file is detected by monitoring for message ID CPF0864 using the MONMSG command. This message is sent when a read operation reaches the end of a file. ENDPGM ends a program, STRPGM has no meaning, and STRDBG starts debugging.