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
-
This means that the ResultSet is insensitive to scrolling
-
This means that the Resultset is sensitive to scrolling, but insensitive to updates, i.e. not
-
This means that the ResultSet is sensitive to scrolling, but insensitive to changes made by others
-
The meaning depends on the type of data source, and the type and version of the driver you use with this data source
C
Correct answer
Explanation
In JDBC, ResultSet.TYPE_SCROLL_INSENSITIVE indicates a scrollable result set that is not sensitive to changes made by others while it is open. Distractors confuse general scrolling ability with sensitivity to modifications.
-
clfy:menuitem, clarifyMenu.tld
-
clfy:menu , clarify.tld
-
clfy:menu, clarifyMenu.tld
-
Clfy:menu, clarify.tld
B
Correct answer
Explanation
The ClfyMenu custom tag in Clarify JSPs uses the 'clfy:menu' tag syntax and is defined in the clarify.tld (Tag Library Descriptor) file. Options A and C incorrectly use 'clarifyMenu.tld' while D has incorrect capitalization 'Clfy:menu' instead of 'clfy:menu'.
B
Correct answer
Explanation
Silverlight applications are built using the .NET Framework, with C# being the primary backend programming language. While other .NET languages like VB.NET can be used, C# is the standard and most widely used language for Silverlight development.
-
High Level Language
-
Low Level Language
-
Mid Level Language
-
None of the Above
B
Correct answer
Explanation
Assembly language is classified as a low-level language because it provides minimal abstraction from the computer's instruction set architecture. Unlike high-level languages which use human-readable syntax and complex abstractions, assembly language uses mnemonic codes that directly correspond to machine instructions, requiring programmers to manage hardware details like registers and memory addresses.
-
Interpretor
-
Compiler
-
Assembler
-
None of the above
C
Correct answer
Explanation
An assembler is the specialized program that translates assembly language mnemonics into machine code. Unlike compilers which work with high-level languages, or interpreters which execute code line-by-line, assemblers perform a direct one-to-one conversion of assembly instructions to their binary machine code equivalents.
-
Duomorphic
-
Isomorphic
-
Trimorphic
-
Translate
B
Correct answer
Explanation
Assembler translation is isomorphic because there is a one-to-one correspondence between assembly language mnemonics and machine instructions. Each assembly statement typically maps to exactly one machine instruction, maintaining a direct structural relationship between the source code and the output.
-
PreparedStatement
-
) ParameterizedStatement
-
) ParameterizedStatement and CallableStatement
-
All the above
A
Correct answer
Explanation
PreparedStatement is the standard JDBC class that supports parameter placeholders ( ? ) and lets you set values before execution. CallableStatement is used for stored procedures, which also accept parameters, but the question asks for a type that can execute parameterized queries, and the only universally correct choice listed is PreparedStatement. The other options refer to non‑existent classes, so the stored answer is right.
-
01-49, 66
-
01-49,77
-
01-49,66,77,88
-
01-49
C
Correct answer
Explanation
COBOL supports standard record levels 01 through 49, along with special level numbers 66 for renaming items, 77 for independent elementary items, and 88 for condition names.
-
TLDs
-
DDLs
-
Web-inf
-
Meta-Inf
A
Correct answer
Explanation
Standard JSP custom tag libraries use TLD (Tag Library Descriptor) files, typically stored in WEB-INF or META-INF. The question mentions non-standard 'ps:' tags, but if this is a standard JSP question about TLD files, option A is correct. However, 'ps:' is not a standard JSP tag prefix.
-
01-49, 66
-
01-49,77
-
01-49,66,77,88
-
01-49
D
Correct answer
Explanation
In COBOL, standard record level numbers range from 01 to 49, with 01 being the highest (most major) and 49 being elementary items. Levels 66 (RENAMES), 77 (independent elementary items), and 88 (condition names) are special-purpose levels with specific functions outside the regular 01-49 hierarchy. Option A and B are incomplete, C includes special levels incorrectly.
-
Private
-
Public
-
Abstract
-
Protected
A
Correct answer
Explanation
Workbook_Open() defaults to Private scope in the ThisWorkbook module, meaning it can only be called from within that module, not from outside. Private is the default access modifier for procedures in class modules like ThisWorkbook.
A
Correct answer
Explanation
REXX programs can indeed be compiled using a REXX compiler for improved performance and code protection. While REXX is traditionally an interpreted language, compilers exist that translate REXX source to executable form. The statement is accurate - REXX supports both interpreted and compiled execution models.
-
<!-- - - >
-
<%-- --%>
-
</* */>
-
//
B
Correct answer
Explanation
JSP comments are written using the <%-- --%> syntax, which prevents the commented content from being compiled or sent to the client. The `syntax creates HTML comments, which are sent to the client, while//and/* */` are Java/JavaScript style comments.
-
Declaration
-
Scriplets
-
Expressions
-
All the above
D
Correct answer
Explanation
JSP has three main scripting elements: Declaration (<%! ... %>) for declaring variables or methods, Scriptlets (<% ... %>) for embedding Java code, and Expressions (<%= ... %>) for outputting values. All three are fundamental JSP scripting elements, making 'All the above' the correct answer.
-
Presentation Tag
-
JSP standard Tag
-
Custom tags
-
All the above
D
Correct answer
Explanation
JSP supports multiple tag types: Presentation tags (for formatting and display), JSP Standard Tag Library (JSTL) tags for common tasks, and Custom tags defined by developers. All three categories are valid JSP tag types, making 'All the above' correct.