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
-
Request.Form;
-
Request.QueryString;
-
Request_Get("");
-
$GET[]
-
$_GET[];
E
Correct answer
Explanation
PHP uses the $_GET[] superglobal array to retrieve data from forms submitted via the GET method. This is a built-in associative array that automatically contains all data sent through the URL query string. Option B uses ASP syntax, while option D is missing the underscore prefix.
-
<?php include_file("time.inc"); ?>
-
<% include file="time.inc" %>
-
<?php require("time.inc"); ?>
-
<!--include file="time.inc"-->
C
Correct answer
Explanation
The require() function is used to include files in PHP, and it will cause a fatal error if the file cannot be found. While include() also works, require is generally preferred for essential files. Option A uses a non-existent function, option B uses ASP syntax, and option D uses an HTML comment.
-
$_REQUEST[]
-
$_GET[]
-
$_POST[]
-
$_SESSION[]
A
Correct answer
Explanation
$_REQUEST[] is the correct variable that can retrieve values from both GET and POST methods. It's a superglobal array that contains data from $_GET, $_POST, and $_COOKIE. While $_GET and $_POST work for their specific methods, $_REQUEST combines them for convenience.
-
Will run smoothly
-
Will generate fetal error.
-
Generate error and continue executing.
-
Stop the running.
-
mysql con=new mysql("Connection string")
-
mysql("database name");
-
mysql_connect("database name")
-
mysql_connect("database",username,password)
D
Correct answer
Explanation
The correct syntax is mysql_connect() with three parameters: server hostname, username, and password. Option D shows the correct parameter order, though the database name is actually a fourth optional parameter. Options A and B use incorrect syntax, while option C is missing the required connection parameters.
A
Correct answer
Explanation
A component definition file serves as the central reference that specifies and links all the other pieces that make up a complete component. This includes the WDK form for UI, Java behavior class for logic, and NLS properties bundle for internationalization support.
B
Correct answer
Explanation
In Documentum WDK, multiple forms within a component are not required to have their own unique behavior class. Instead, they typically share a single component behavior class that manages the states and actions of the entire component, making the statement false.
-
Data Oriented Language
-
Service Oriented Language
-
Object Oriented Language
-
Structured Oriented Language
C
Correct answer
Explanation
Visual Basic.NET is fundamentally an object-oriented language that supports core OOP principles like encapsulation, inheritance, and polymorphism. While it can handle data operations and structured programming, its architecture is built around objects and classes, not data-centric or service-only paradigms.
-
Java & C
-
mxml & as
-
C & C
-
java & javascript.
B
Correct answer
Explanation
Flex applications use MXML (Markup Language) for UI layout and ActionScript (as) for logic. Java, C, and JavaScript are not the core languages used in Flex development.
-
Java & C
-
mxml & as
-
C & C
-
java & javascript.
B
Correct answer
Explanation
Flex uses MXML (Markup Language) for declarative UI layout and ActionScript for programmatic logic. Java, C, and JavaScript are not the core languages of Flex.
-
COBOL
-
JAVA
-
REXX
-
VS PASCAL
B
Correct answer
Explanation
IMS historically supports mainframe-era languages including COBOL, Assembler, PL/I, and REXX. VS PASCAL is also supported in IBM mainframe environments. Java, however, is not natively supported in traditional IMS environments - it emerged later as part of the J2EE ecosystem and requires different integration approaches like IMS Connect or JDBC adapters.
-
Dennis Ritchie
-
Edsger Dijkstra
-
James Gosling
-
Louis Pasteur
C
Correct answer
Explanation
Java was created by James Gosling at Sun Microsystems in the early 1990s, originally called 'Oak.' The language was designed to be platform-independent using the Java Virtual Machine (JVM). Dennis Ritchie developed C, Dijkstra was a computer science pioneer known for algorithms, and Louis Pasteur was a biologist, not a programmer.
-
object oriented programming language
-
programming language
-
scripting language
-
database
D
Correct answer
Explanation
Oracle is a relational database management system (RDBMS) - it is database software, not a programming language, object-oriented language, or scripting language. While Oracle does have PL/SQL (a procedural language extension), Oracle itself refers to the database platform and software, not a language.
-
COncentrated Behavioral Orientation language
-
COmmon Behavioral Orientation language
-
COmmon Business Oriented Language
-
COncentrated Business Orientated language
C
Correct answer
Explanation
COBOL stands for COmmon Business Oriented Language. This name reflects its original purpose - a language designed for business, data processing, and administrative applications. Options A, B, and D incorrectly expand the acronym with 'Concentrated' or misspell 'Orientated.'
-
Java
-
.Net
-
Java Tech
-
.Net Tech