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
-
NO ERROR but offcourse the result will differ.
-
syntax error will occur
-
Run time error
-
NO ERROR with same result
D
Correct answer
Explanation
Applying the distributive law of multiplication over addition, summing the items first and then multiplying the total by the discount yields the exact same mathematical result as multiplying each item individually.
A
Correct answer
Explanation
The INITIALIZE verb in COBOL explicitly does NOT initialize FILLER items. FILLER is a reserved word that denotes unnamed data items, and INITIALIZE only initializes items with names. This is documented behavior in the COBOL language specification to preserve FILLER areas which often contain formatting or spacing.
-
YES
-
NO, any condition along with equal can be checked
-
Except Equal condition any condition can be chencked
-
It Depends on the use of Search statement on perticular scenario
A
Correct answer
Explanation
In COBOL, the SEARCH ALL statement performs a binary search and is restricted to testing only equal (=) conditions. It cannot evaluate other relational operators like greater than or less than.
-
Iterpreted Language
-
Compiled Language
-
Byte Code Language
-
None of these
D
Correct answer
Explanation
Java is neither purely interpreted nor purely compiled - it's a hybrid language. Java source code is compiled to bytecode, which is then either interpreted by the JVM or JIT-compiled to native code at runtime. 'Byte Code Language' is not a standard programming language classification.
-
a programming language
-
A technique
-
related to window XP
-
None of the above
B
Correct answer
Explanation
Extreme Programming (XP) is a software development technique/framework, not a programming language or related to Windows XP. It emphasizes pair programming, testing, and frequent releases.
-
<procedure id="swapEmailAddresses" parameterName="swapParameters" > {call swap_email_address (?, ?)} </procedure>
-
<procedure id="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>
-
<procedure name="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>
-
<procedure propertyName="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>
B
Correct answer
Explanation
In iBATIS stored procedures, the correct attribute for parameter mapping is 'parameterMap'. The 'parameterName' attribute doesn't exist in the iBATIS DTD. The procedure uses the parameterMap named 'swapParameters' to map output parameters correctly.
-
an object-oriented scripting language.
-
a compiled scripting language.
-
a scripting language precompiled in the browser.
-
a low-level programming language
-
Less than 5%
-
Less Than 25%
-
40%
-
More than 50%
-
Subject Oriented Language
-
Object Oriented Language
-
testing tool
-
Server
B
Correct answer
Explanation
Java is fundamentally an object-oriented programming language. It supports core OOP concepts including classes, objects, inheritance, encapsulation, polymorphism, and abstraction. Java is not a 'subject-oriented' language, a testing tool, or a server - it's a general-purpose programming language with OOP as its foundation.
B
Correct answer
Explanation
ABAP (Advanced Business Application Programming) is SAP's proprietary programming language, designed specifically for developing business applications within the SAP ecosystem. R/3 is SAP's ERP product name, NetWeaver is their technology platform, and Java is a general-purpose language not owned by SAP.
-
Java programming is derived from C++.
-
The Java Virtual Machine1(JVM) interprets the program for the native operating system.
-
The compiler is identical to a C++ compiler.
-
The APIs do all the work.
B
Correct answer
Explanation
Java programs achieve platform independence through the Java Virtual Machine (JVM). Java source code is compiled to bytecode, which the JVM interprets or compiles to native code for the specific platform. The JVM abstracts away platform-specific details, allowing the same bytecode to run anywhere. Option B is correct.
D
Correct answer
Explanation
Java supports three comment types. Single-line comments use //, multi-line comments use /* /, and documentation comments (Javadoc) use /* */. The documentation comment style is a special variant of multi-line comments that can be processed by Javadoc to generate API documentation. All three styles are valid. Option D is correct.
-
System
-
SecurityManager
-
Math
-
Runtime
A
Correct answer
Explanation
The System class in java.lang provides the standard input, output, and error streams (System.in, System.out, System.err) used for basic console I/O. It also contains utility methods. SecurityManager is for security policies, Math is for mathematical functions, and Runtime is for interacting with the runtime environment. Option A is correct.
-
error-page
-
exception-type
-
location
-
None of the above
A
Correct answer
Explanation
In web.xml, the tag defines error page mappings for exception types or HTTP error codes. The exception-type and location are sub-elements within error-page tags, not standalone defining tags. The element wraps the complete error handling configuration.
-
IGYWCL
-
IEWL
-
IEBCOMPILE
-
IGYCRCTL
D
Correct answer
Explanation
IGYCRCTL is the actual compiler program for IBM Enterprise COBOL. IGYWCL is a cataloged procedure (JCL) that invokes the compiler and the link-editor, but the specific program that performs the compilation is IGYCRCTL.