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
-
Server Explorer
-
Solution Explorer
-
Properties Window
-
Toolbox
A
Correct answer
Explanation
Server Explorer in Visual Studio enables you to work with database connectivity - you can create, modify, and delete database connections, view database objects, and drag tables onto your designer. Solution Explorer manages project files, Properties Window shows component settings, and Toolbox contains UI controls.
-
escape
-
asfunction
-
fscommand
-
MMExecute
B
Correct answer
Explanation
The 'asfunction' protocol is a special URL protocol used in HTML text fields within Flash/ActionScript. It allows an href link to call an ActionScript function directly. For example: 'asfunction:myFunction,param' would call the function myFunction with parameter param. This is the correct mechanism for calling ActionScript from HTML links.
-
eval
-
getProperty
-
escape
-
call
C
Correct answer
Explanation
The escape() function in ActionScript converts a parameter to a string and encodes it in URL-encoded format. All non-alphanumeric characters (except some like * @ - _ . +) are replaced with %XX hexadecimal sequences. For example, a space becomes %20. This is essential for passing data safely in URLs.
-
toEval()
-
toStr()
-
string()
-
eval()
D
Correct answer
Explanation
eval() is a JavaScript/ActionScript function that evaluates a string expression and can access variables, properties, objects, or movie clips by name. It dynamically executes code stored as strings. The other options (toEval, toStr, string) are not valid functions for this purpose.
-
functionOpenWindow ( )
-
funOpenWindow123 ( )
-
OpenWindow ( )
-
funcOpenWindow ( )
D
Correct answer
Explanation
In QTP (QuickTest Professional) scripting, function names must follow specific naming conventions. The function name must start with 'func' followed by the actual name. 'funcOpenWindow()' follows this convention correctly. The other options are invalid: 'functionOpenWindow()' uses the full word 'function', 'funOpenWindow123()' is an incorrect abbreviation, and 'OpenWindow()' lacks the required prefix. These naming rules help distinguish user-defined functions from built-in functions and keywords.
-
Unix
-
Java
-
C
-
BASIC functions
-
Alpha-numeric (X), alphabetic (A) and numeric(9).
-
Alpha-numeric (X) and numeric(9).
-
Alpha-numeric (X), alphabetic (A), String (S) and numeric(9)
-
None of the above
A
Correct answer
Explanation
COBOL has three fundamental data types specified by picture clauses: Alphabetic (A) for letters only, Alphanumeric (X) for letters, numbers, and special characters, and Numeric (9) for digits only. Option C incorrectly includes 'String (S)' which is not a COBOL picture clause - the 'S' in picture clauses indicates a signed number, not a separate data type. The basic three types are A, X, and 9.
A
Correct answer
Explanation
The PROC SQL step contains two statements: the PROC SQL statement and the SELECT statement. The SELECT clause, FROM clause, and ORDER BY clause are all part of the SELECT statement. The question asks for the number of statements, not clauses.
-
Omitting the ORDER BY clause when you create tables and views improve the query performance.
-
using joins instead of subqueries improve the query performance.
-
A good practice to improve query performance is using WHERE expressions to limit the size of result tables created with joins.
-
Must use the ORDER BY clause when you create tables and views.
D
Correct answer
Explanation
ORDER BY is an optional clause when creating tables and views, used only to sort the result set. Omitting it can improve performance by avoiding unnecessary sorting. WHERE clauses are recommended to limit result sizes. Using joins instead of subqueries is a performance best practice.
B
Correct answer
Explanation
The RESET statement in PROC SQL is used to reset specific options or settings, not to add, drop, or change options dynamically. It can reset certain parameters but does not provide the comprehensive option management described in the question.
-
MODIFY creates a second copy of the data while variables in the data are being matched with a WHERE clause and then deletes the second copy.
-
You cannot modify the descriptor portion of the data set using the MODIFY statement
-
You can use the MODIFY statement to change the name of a variable.
-
If the system terminates abnormally while a DATA step that is using the WHERE statement is processing, SAS automatically saves a copy of the unaltered data set.
B
Correct answer
Explanation
The MODIFY statement cannot modify descriptor information like variable names, labels, or attributes - only data values. Options A and C are false. Option D is incorrect as SAS does not automatically save copies during abnormal termination. Descriptor changes require other statements like RENAME.
-
SELECT
-
FROM
-
WHERE
-
both a and c
A
Correct answer
Explanation
The WHERE clause uses 'ge' which is a SAS operator, not a SQL operator. In PROC SQL, the correct operator is '>='. The SELECT and FROM clauses are written correctly with proper syntax for column selection and table reference.
-
Programming Language
-
Content Management System
-
Scripting Language
-
Operating System
B
Correct answer
Explanation
Drupal is a free, open-source Content Management System (CMS) written in PHP. It provides a platform for building and managing websites, blogs, and online communities without writing code from scratch. Drupal's modular architecture allows extensibility through themes and modules, distinguishing it from programming languages, scripting languages, or operating systems.
C
Correct answer
Explanation
Drupal is written in PHP, a server-side scripting language designed for web development. The Drupal core and most contributed modules use PHP. This choice allows Drupal to run on any server with PHP support, including Apache and Nginx on Linux, Windows, or macOS. Java, C#, and ASP.NET are used in other web frameworks but not Drupal.
-
By making use of the InsertStatement, DeleteStatement or UpdateStatement classes
-
By invoking the execute(...) or executeUpdate(...) method of a normal Statement object
-
By invoking the executeInsert(...), executeDelete(...) or executeUpdate(...) methods of
-
By making use of the execute(...) statement of the DataModificationStatement object
B
Correct answer
Explanation
DML statements (INSERT, UPDATE, DELETE) are executed using Statement.execute() for general SQL or Statement.executeUpdate() which returns the row count. The other options describe non-existent classes and methods - there are no separate InsertStatement/DeleteStatement classes, nor executeInsert/executeDelete methods on Statement.