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
B
Correct answer
Explanation
In RPG (Report Program Generator), only one file can be designated as the primary file ('P' in file description specifications) to drive the program's cycle. While multiple secondary or full-procedural files are allowed, only one primary file is permitted.
-
Faster than a program written in a shell script language, but slower than a program in a native language such as C
-
Slower than programs in shell script languages, but with modern computers that isn't a problem
-
About the same speed as a program written in a native language such as C, and much faster than a shell script
-
Faster than anything else on the same computer
A
Correct answer
Explanation
Java bytecode runs on JVM (interpreted/JIT-compiled), placing its performance between shell scripts (slow interpreted) and native languages like C (compiled to machine code).
-
A widget set for programmers
-
A programming language
-
A set of programmer's libraries
-
A network service
B
Correct answer
Explanation
Java is fundamentally a high-level, class-based, object-oriented programming language designed for platform independence.
-
Java is an object-oriented language.
-
Java is a language that is network-aware.
-
Java is a language which gives you great freedom in how you write your program.
-
Java is a portable language.
C
Correct answer
Explanation
Java enforces strict rules (strong typing, no pointers, garbage collection, OOP structure) that constrain how you write code - less freedom than C/C++ but safer and more maintainable.
-
1
-
2
-
There is no limit
-
COBOL if statements are not used to compare variable values
A
Correct answer
Explanation
A COBOL IF statement evaluates a single condition at a time. While you can combine conditions using AND/OR connectors, the fundamental IF construct makes one comparison decision. For multiple independent comparisons, you need nested IFs.
-
Infinite loop
-
Logical Error
-
Runtime Error
-
All of the above
-
None of the above
D
Correct answer
Explanation
COBOL IF statements can encounter logical errors (wrong condition logic), runtime errors (invalid data type comparison), and infinite loops (when combined with PERFORM or if condition never becomes false due to state changes). All three error types are possible in IF-based control flow.
-
For loop
-
Do-While loop
-
Method
-
None of the Above
B
Correct answer
Explanation
COBOL's PERFORM...UNTIL structure is analogous to a do-while loop in languages like Java and C++ - it executes the code block, then checks the condition, repeating until the condition becomes true. It's not a for loop (fixed iteration) or a method call.
-
Use a standard perform statement
-
Use an in line perform
-
Skillful use of the COBOL reserved word "AFTER"
-
This is not possible in COBOL
C
Correct answer
Explanation
The AFTER clause in COBOL PERFORM statements allows condition checking after initial execution, enabling the loop to run once before evaluation. Standard PERFORM checks first, inline PERFORM is about code placement, and the functionality is definitely possible in COBOL.
-
Exits the statement
-
Executes the function
-
Exits the Program
-
Executes the If statement again
B
Correct answer
Explanation
When an IF condition evaluates to true, the first action is executing the code or function within the IF block. Only after execution does flow continue to any ELSE or statement exit. It doesn't exit immediately, exit the program, or re-execute.
B
Correct answer
Explanation
PERFORM UNTIL executes until a condition becomes true, making the number of iterations unknown at the start. Unlike PERFORM VARYING or times-based loops, UNTIL loops continue based on runtime condition evaluation, not a predetermined count.
A,B,D
Correct answer
Explanation
Custom transformations in PowerCenter are written in C, C++, or Java. These languages provide the performance and integration needed for custom code within the Informatica ecosystem. Perl and C# are not supported for Custom transformations.
-
Common Language Specification
-
Common Language Runtime
-
Base Class Library
-
None
-
All the Above
B
Correct answer
Explanation
CTS (Common Type System) is contained in the Common Language Runtime (CLR), which is the execution engine of .NET. It is not contained in CLS, BCL, or other components.
-
C ,Java
-
C,C++,Java
-
Java,linux
-
Java ,Pearl
B
Correct answer
Explanation
Android's architecture uses multiple languages: Java for application development and the Android framework, C++ for native code and libraries (via NDK), and C for the Linux kernel itself. This layered approach balances performance with developer productivity.
-
Rock Band
-
Programming Language
-
Web Browser
-
Java Framework
C
Correct answer
Explanation
Mosaic was a pioneering web browser released in 1993 by the National Center for Supercomputing Applications (NCSA). It was instrumental in popularizing the World Wide Web and helped establish the web as we know it today by making it accessible to non-technical users through its graphical interface.
-
Job Centre Language
-
Job Control Language
-
Job Comitte Language
-
Job Control Limit
B
Correct answer
Explanation
JCL stands for Job Control Language, which is used on IBM mainframe systems to tell the operating system what program to run and what resources to allocate. It's a scripting language for batch job processing. Job Centre Language, Job Comitte Language, and Job Control Limit are incorrect expansions.