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
-
document.appletname.getGridObject ().getCellValue (row, column)
-
document.appletname.getValue (column, row)
-
document.appletname.getValue (row, column)
-
none of the above
B
Correct answer
Explanation
iCommand applets expose values through the getValue(column, row) method in JavaScript. The parameter order is column first, then row index - this is a specific API convention in MII applets. Option B shows the correct syntax.
-
Compiler Language Runtime
-
Common Language Runtime
-
Common Language Running Time
-
Compiler Language Running Time
B
Correct answer
Explanation
CLR stands for Common Language Runtime, the execution environment for .NET applications. It manages memory, handles exceptions, and provides core services for running managed code. This is a fundamental .NET framework concept.
D
Correct answer
Explanation
MSIL (Microsoft Intermediate Language) is the intermediate language in .NET. When you compile .NET code, it's converted to MSIL, which is then converted to native machine code by the JIT compiler at runtime. This allows .NET code to be language-agnostic.
-
When the developer packages the application
-
When the application loads
-
The first time it is called
-
When the application is installed
-
Each time it is called
C
Correct answer
Explanation
JIT (Just-In-Time) compilation occurs on-demand - when a method is first invoked at runtime. The method is converted from IL to native code immediately before its first execution, then cached for subsequent calls. This is the core 'just-in-time' concept - compiling right when it's needed.
-
The Common Language Run-time compiles source code to MSIL code.
-
The C# and VB.NET compilers compile source code to native code
-
Code compiled in one .NET language can interact with code compiled in a different .NET language
-
The CLR does NOT implement a Common Type System
C
Correct answer
Explanation
The CLR enables language interoperability in .NET by allowing code compiled in one .NET language (like C#) to interact with code compiled in another .NET language (like VB.NET). This is possible because all .NET compilers compile to MSIL (Microsoft Intermediate Language), which the CLR executes, and the CLR implements a Common Type System (CTS) ensuring type compatibility across languages.
-
Windows GUI application
-
Distributed COM
-
Windows Service
-
Web Service
D
Correct answer
Explanation
Web Services are designed to support interoperable machine-to-machine interaction over a network using standard protocols like HTTP and exchanging payloads in XML formats (such as SOAP). Windows GUI apps, Windows Services, and DCOM do not inherently fit this design pattern.
-
Conventional Language Runtime
-
Clarified Language Runtime
-
Common Language Runtime
-
Clear Language Runtime
C
Correct answer
Explanation
CLR stands for Common Language Runtime, which is the virtual machine component of Microsoft's .NET framework. It manages program execution and provides services like memory management, security, garbage collection, and exception handling. The 'Common' signifies that multiple languages (C#, VB.NET, F#) can all compile to IL code that runs on the same runtime. Options A, B, and D are incorrect expansions of the acronym.
D
Correct answer
Explanation
The LINKAGE SECTION in a COBOL program is used specifically in called (sub) programs to define data items that will receive parameters passed from the calling program. It 'links' or maps the calling program's data to the called program's working storage, enabling parameter passing between programs.
-
Account.Username
-
User.Name
-
Page.Username
-
Environment.Username
D
Correct answer
Explanation
Environment.Username retrieves the Windows identity account name under which the current thread is executing. For ASP.NET applications, this returns the application pool identity (such as NETWORK SERVICE, IIS_APPPOOL, or a custom service account) configured in IIS.
-
Http-Post
-
Http-Get
-
SOAP
-
All the above
D
Correct answer
Explanation
ASP.NET Web Services support multiple protocols for communication. HTTP-GET and HTTP-POST are simpler protocols for basic method invocations, while SOAP provides a robust, standards-based protocol with envelope formatting and WS-* extensions. The service can be configured to expose endpoints via any or all of these protocols simultaneously.
-
Request.ClientAddress
-
Request.UserHostAddress
-
Request.IPAddress
-
Request.Client.IPAddress
B
Correct answer
Explanation
The Request.UserHostAddress property in ASP.NET returns the IP address of the client making the request. This is the standard way to retrieve the client's IP in both Web Forms and MVC. The other property names shown do not exist in the Request object.
-
4GL
-
4 Test Script
-
VB
-
VBScript
D
Correct answer
Explanation
QuickTest Professional (QTP), now known as Unified Functional Testing (UFT), uses VBScript as its scripting language. VBScript is a lightweight, interpreted scripting language based on Visual Basic that allows testers to write automated test scripts with programming constructs like loops, conditions, and functions.
-
Section
-
Paragraph
-
Modules
-
Division
C
Correct answer
Explanation
COBOL programs are hierarchically structured with four divisions (Identification, Environment, Data, Procedure), which contain sections, and sections contain paragraphs. 'Modules' is not a standard COBOL structural component - this term is used in other programming languages but not in COBOL's hierarchy.
B
Correct answer
Explanation
REDEFINES and OCCURS cannot both be specified at the same level number in a COBOL data description entry. REDEFINES must be at the same level as the item being redefined, while OCCURS creates a table/array. To use both, you would typically use REDEFINES at one level and have OCCURS in a subordinate level within the redefined item.