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

Multiple choice technology mainframe
  1. NO ERROR but offcourse the result will differ.

  2. syntax error will occur

  3. Run time error

  4. NO ERROR with same result

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. YES

  2. NO, any condition along with equal can be checked

  3. Except Equal condition any condition can be chencked

  4. It Depends on the use of Search statement on perticular scenario

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. Iterpreted Language

  2. Compiled Language

  3. Byte Code Language

  4. None of these

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology testing
  1. a programming language

  2. A technique

  3. related to window XP

  4. None of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology databases
  1. <procedure id="swapEmailAddresses" parameterName="swapParameters" > {call swap_email_address (?, ?)} </procedure>

  2. <procedure id="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>

  3. <procedure name="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>

  4. <procedure propertyName="swapEmailAddresses" parameterMap="swapParameters" > {call swap_email_address (?, ?)} </procedure>

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. Subject Oriented Language

  2. Object Oriented Language

  3. testing tool

  4. Server

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. R/3

  2. ABAP

  3. Netweaver

  4. Java

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. Java programming is derived from C++.

  2. The Java Virtual Machine1(JVM) interprets the program for the native operating system.

  3. The compiler is identical to a C++ compiler.

  4. The APIs do all the work.

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. 1,2

  2. 2,3

  3. 3,1

  4. 1,2,3

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. System

  2. SecurityManager

  3. Math

  4. Runtime

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology web technology
  1. error-page

  2. exception-type

  3. location

  4. None of the above

Reveal answer Fill a bubble to check yourself
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.