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 programming languages
  1. lazy="true"

  2. lazy="false"

  3. lazy="on"

  4. lazy="off"

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Batch fetching is a performance optimization used with lazy loading to avoid the n+1 select problem. When lazy="true", Hibernate can batch multiple lazy initialization requests into a single query. With lazy="false", data is eagerly loaded, making batch fetching unnecessary. Options C and D use invalid attribute values.

Multiple choice technology platforms and products
  1. thread

  2. node

  3. both a and b

  4. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Ab Initio, declare pages can be of both thread and node types. This flexibility allows declare pages to be used in different parallel processing contexts - thread-level for shared memory operations and node-level for distributed processing across partitions.

Multiple choice technology web technology
  1. Localization

  2. Globalization

  3. Translate

  4. Nationalize

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Globalization is the process of designing applications that are culture-neutral and language-neutral, supporting multiple locales without modification. Localization comes later, adapting the globalized application to specific cultures/regions. Translation and Nationalize are not technical terms in this context.

Multiple choice technology databases
  1. E

  2. I

  3. F

  4. C

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In RPG/400 programming, arrays are declared in the E-spec (Extension specification). The E-spec is specifically designed for defining array characteristics including dimensions, and element sizes. Other specs like I (Input), F (File), or C (Calculation) serve different purposes.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

conio.h (Console Input/Output) is NOT an ANSI/ISO standard C header file. It was originally developed for DOS and Microsoft operating systems. Functions like clrscr(), getch(), and getche() from conio.h are platform-specific and not part of the standard C library, which uses stdio.h for input/output operations.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

conio.h (Console Input/Output) is NOT an ANSI/ISO standard C header file. It was originally developed for DOS and Microsoft operating systems. Functions like clrscr(), getch(), and getche() from conio.h are platform-specific and not part of the standard C library, which uses stdio.h for input/output operations.

Multiple choice technology databases
  1. Only local or packaged sub programs can be overloaded.

  2. Overloading allows different functions with the same name that differ only in their return types.

  3. Overloading allows different subprograms with the same number, type and order of the parameter.

  4. Overloading allows different subprograms with the same name and same number or type of the parameters.

  5. Overloading allows different subprograms with the same name but different in either number or type or order of parameter.

Reveal answer Fill a bubble to check yourself
A,E Correct answer
Explanation

PL/SQL package subprogram overloading allows multiple subprograms (procedures or functions) to share the same name, provided their formal parameters differ in number, data type, or order. Overloading cannot be done based solely on differing return types, and standalone subprograms cannot be overloaded.

Multiple choice technology databases
  1. Packages can be nested.

  2. You can pass parameters to packages.

  3. A package is loaded into memory each time it is invoked.

  4. The contents of packages can be shared by many applications.

  5. You can achieve information hiding by making package constructs private.

Reveal answer Fill a bubble to check yourself
D,E Correct answer
Explanation

Package contents can be shared across multiple applications (D), and packages support information hiding by allowing private constructs not exposed to the outside (E). Packages cannot be nested (A), you pass parameters to package subprograms not the package itself (B), and packages load once per session not each time (C).

Multiple choice technology life sciences
  1. End Points

  2. Web Reference

  3. Directly referring the URL

  4. All of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

WCF services are structurally exposed to external clients using endpoints, which consist of an Address, Binding, and Contract (ABC). Web references and direct URL references are client-side techniques for consuming services rather than exposing them.

Multiple choice technology operating systems
  1. C++

  2. Java

  3. C#

  4. Objective C

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Windows Phone 7 application development used C# as the primary programming language, along with XAML for UI markup. Silverlight for Windows Phone provided a subset of the Silverlight framework, and C# was the official language for WP7 app development in Visual Studio 2010.

Multiple choice technology programming languages
  1. Byte Code

  2. Firewall

  3. Class Code

  4. Bit Code

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Java programs achieve platform independence by compiling source code into bytecode. This bytecode runs on any system with a Java Virtual Machine (JVM). Bit code, class code, and firewall are not the names of this intermediate format.

Multiple choice technology mainframe
  1. DISPLAY A,DISPLAY B

  2. DISPLAY A DISPLAY B

  3. DISPLAY A DISPLAY B WITH NO ADVANCING

  4. DISPLAY A WITH NO ADVANCING DISPLAY B

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To display two variables on the same line using separate DISPLAY statements, use WITH NO ADVANCING after the first DISPLAY statement. This prevents the cursor from moving to the next line after displaying A, so B appears on the same line. Without NO ADVANCING, each DISPLAY statement outputs on a new line. The correct syntax is 'DISPLAY A WITH NO ADVANCING' followed by 'DISPLAY B'.