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
\$ask is not a predefined variable in PHP. PHP has several predefined superglobal variables (automatically available in all scopes): \$_GET, $_POST, $_REQUEST, $_SERVER, $_FILES, $_COOKIE, $_SESSION, $_ENV, and $GLOBALS. The question uses lowercase $get, $post, \$request which are technically not the correct superglobal names (should be \$_GET, $_POST, $_REQUEST), but $ask is definitely not a predefined PHP variable in any form.
-
You can define a constant by using the define() function. Once a constant is defined
-
It can never be changed but can be undefined
-
It can be changed but can not be undefined
-
It can be changed and can be undefined
-
You can define a constant by using the define() function. Once a constant is defined
-
It can never be changed but can be undefined
-
It can be changed but can not be undefined
-
It can be changed and can be undefined
D
Correct answer
Explanation
ASP.NET supports multiple languages for server-side scripting through the .NET Framework language interoperability. The primary languages are C# (c#) and VB.NET (VB - referring to Visual Basic .NET). C++ is NOT typically used for ASP.NET server-side scripting (managed C++ exists but is not a standard ASP.NET language option). Therefore 'A & B' (both C# and VB) is correct.
-
Session object
-
Application object
-
View state
-
All of the above
D
Correct answer
Explanation
ASP.NET provides multiple state management mechanisms for different scopes and lifecycles. Session object maintains user-specific data across requests, Application object stores global data shared across all users, and ViewState preserves page-specific control values during postbacks. All three are valid state management techniques in ASP.NET applications.
-
COmmon Business Oriented Language
-
COmplete Business Oriented Language
-
COmpletely Business Oriented Language
-
COmmon Business Objective Language
A
Correct answer
Explanation
COBOL stands for Common Business-Oriented Language, designed specifically for business applications. The 'Common' indicates it was meant to be widely shared across systems, not 'Complete' or 'Completely' as options B and C suggest. Option D incorrectly uses 'Objective' instead of 'Oriented.'
-
after
-
before
-
simutaneoulsy
-
can't say
A
Correct answer
Explanation
When a popup page is activated, the Activate PeopleCode for the popup page executes AFTER the page activate event for the main page has completed. This sequencing ensures the main page is fully processed before the popup logic runs.
-
programming
-
processing
-
reporting
-
structural
A
Correct answer
Explanation
SQR is a programming language designed for accessing and manipulating data to create custom reports. It combines SQL queries with procedural programming constructs like loops, variables, and conditional logic.
A
Correct answer
Explanation
In SQR programming, the DO command is used to invoke or call a procedure. This allows for modular code structure and reusability of code blocks.
D
Correct answer
Explanation
The MOVE command in SQR performs implicit datatype conversion when moving values between variables of different types. This allows automatic conversion between numeric, string, and date types.
-
To provide data security at the application level
-
To insulate the ABAP/4 developer from the database
-
To connect to the operating system
-
to connect to kernel
A
Correct answer
Explanation
The Data Dictionary in SAP ABAP provides data consistency and data security at the application level by enforcing data definitions, relationships, and constraints. It insulates ABAP developers from underlying database differences, handles the connection to the database (not OS or kernel directly), and ensures data integrity through centralized metadata management.
-
ENVIRONMENT SECTION
-
LIBRARY SECTION
-
ACTIVITY SECTION
-
FILE SECTION
D
Correct answer
Explanation
EasyTrieve does NOT have a FILE SECTION - that is specific to COBOL. EasyTrieve has ENVIRONMENT SECTION for system configuration, LIBRARY SECTION for defining fields and variables, and ACTIVITY SECTION for procedural logic. File handling in EasyTrieve is done differently than in COBOL.
-
JOB AND SORT
-
JOB AND DEFINE
-
SORT AND DEFINE
-
FILE AND JOB
A
Correct answer
Explanation
In CA Easytrieve, the ACTIVITY section contains JOB and SORT statements which define the processing activities of the program. Other terms like DEFINE or FILE are used in the library section, not the activity section. Thus, JOB AND SORT is the correct option.
-
JOB INPUT NULL
-
JOB INPUT FILENAME
-
JOB INPUT SQL
-
ALL THE ABOVE
D
Correct answer
Explanation
Easytrieve supports different input environments, allowing JOB INPUT FILENAME for standard file processing, JOB INPUT NULL for processing without an input file, and JOB INPUT SQL for database queries.
B
Correct answer
Explanation
POINT is the EasyTrieve statement used for skip sequential file processing. It allows positioning to a specific record location in a file, enabling efficient access without reading all preceding records sequentially. SELECT, READ, and GET have different purposes in file operations.