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
-
<html:error/>
-
<html:javaScript>
-
<html:Validate>
-
<html:ClientValidate>
B
Correct answer
Explanation
The tag generates client-side JavaScript validation code based on validation rules defined in the validation framework. It enables automatic client-side validation without requiring developers to write custom JavaScript, though it's often used alongside for displaying messages.
C
Correct answer
Explanation
LINQ (Language Integrated Query) was introduced in .NET Framework 3.5 as a revolutionary way to query data directly from C# and VB.NET. WCF, WPF, and WWF were all introduced in .NET 3.0, not 3.5. LINQ was the major new feature that distinguished .NET 3.5 from the previous version.
-
Job Controlling Language
-
Job Controls Language
-
Job Control Language
-
Job Controller Language
C
Correct answer
Explanation
JCL stands for Job Control Language, which is a scripting language used on IBM mainframe systems to define and execute jobs. The other options incorrectly use 'Controlling', 'Controls', or 'Controller' instead of 'Control'.
-
red orange Purple
-
Green blue Purple
-
red yellow Green
-
red yellow Orange
D
Correct answer
Explanation
The ArrayList starts with red, yellow, orange, green, blue, purple. RemoveRange(3,3) removes 3 elements starting at index 3 (0-based): green, blue, and purple. This leaves red, yellow, orange - the first three items that were added before the removal range.
-
SPSiteEventReceiver
-
SPWebEventReceiver
-
SPWebSiteEventReceiver
-
SPListEventReceiver
B
Correct answer
Explanation
Site-level events like SiteDeleted and SiteDeleting are handled by SPWebEventReceiver. SPSiteEventReceiver does not exist in the SharePoint object model, and SPWebSiteEventReceiver is also not a valid class name.
-
A type of coffee
-
An object-oriented programming language
-
A Structured Programming language
-
An interactive website
B
Correct answer
Explanation
Java is a class-based, object-oriented programming language designed to have as few implementation dependencies as possible. Option A is a humorous reference to coffee, not technical fact. Option C is incorrect because Java is object-oriented, not procedural like C or Pascal. Option D describes web applications, not a programming language.
-
Java programming is derived from C++.
-
The compiler is identical to a C++ compiler.
-
The APIs do all the work.
-
The Java Virtual Machine(JVM) interprets the program for the native operating system.
D
Correct answer
Explanation
Java achieves platform independence through the JVM, which interprets compiled bytecode for each specific operating system. This 'write once, run anywhere' capability is Java's hallmark. Option A is irrelevant - derivation from C++ doesn't enable cross-platform execution. Option B is false - Java compilers are distinct from C++ compilers. Option C overstates API capabilities.
-
Java programming is derived from C++.
-
The Java Virtual Machine(JVM) interprets the program for the native operating system.
-
The compiler is identical to a C++ compiler.
-
The APIs do all the work.
B
Correct answer
Explanation
Java achieves platform independence through its 'write once, run anywhere' capability via the Java Virtual Machine (JVM). Java source code compiles to bytecode, which is then interpreted by the JVM specific to each operating system. The JVM acts as an intermediary, translating the bytecode into native machine instructions for the underlying platform. Option A incorrectly suggests C++ derivation, while option C is wrong because Java compilers are platform-specific, not identical to C++ compilers.
-
A type of coffee
-
An object-oriented programming language
-
A Structured Programming language
-
An interactive website
B
Correct answer
Explanation
Java is an object-oriented programming language that supports classes, objects, inheritance, polymorphism, and encapsulation. It was designed to be simple, secure, and platform-independent. Unlike structured programming languages, Java organizes code around objects rather than functions and procedures.
-
Java programming is derived from C++.
-
The compiler is identical to a C++ compiler.
-
The APIs do all the work.
-
The Java Virtual Machine(JVM) interprets the program for the native operating system.
D
Correct answer
Explanation
Java achieves platform independence through the Java Virtual Machine (JVM). The JVM interprets compiled bytecode for the specific native operating system, allowing the same Java program to run anywhere a JVM is available. This architecture-neutral design separates the compilation process from the execution platform.
-
Java programming is derived from C++.
-
The Java Virtual Machine(JVM) interprets the program for the native operating system.
-
The compiler is identical to a C++ compiler.
-
The APIs do all the work.
B
Correct answer
Explanation
Java's platform independence comes from the JVM. Java source code compiles to bytecode, which the JVM interprets or compiles to native machine code for each specific platform. This abstraction layer is what enables 'write once, run anywhere'. Option A is incorrect - C++ is platform-dependent. Option C is wrong - Java compilers are not identical to C++ compilers. Option D is false - APIs alone don't provide platform independence.
-
a low-level programming language.
-
a scripting language precompiled in the browser.
-
a compiled scripting language.
-
an object-oriented scripting language.
D
Correct answer
Explanation
JavaScript is an object-oriented scripting language that runs in browsers. It's not low-level (A is wrong), not precompiled (B is wrong - it's interpreted), and not compiled (C is wrong). JavaScript supports objects, prototypes, and classes.
-
FileUpLoad
-
Function
-
File
-
Date
C
Correct answer
Explanation
In server-side JavaScript (like Node.js or older server-side JS implementations), the File object provides file system operations. Function and Date are core language objects available on both client and server. FileUpLoad is client-side HTML form handling.
-
The statement(s) it executes run(s) only once.
-
It pauses the script in which it is called.
-
clearTimeOut() won't stop its execution.
-
The delay is measured in hundredths of a second.
A
Correct answer
Explanation
JavaScript's setTimeout() schedules a function to run once after a specified delay. It does not pause script execution (non-blocking) and its delay is measured in milliseconds, not hundredths of a second. clearTimeout() stops it if called before execution, making the first option true.
-
<?php>...</?>
-
<script>...</script>
-
<&>...</&>
-
<?php…?>
D
Correct answer
Explanation
PHP code is parsed inside standard delimiters, which start with `. Other options like XML/HTML style tags (...?>), ASP-like tags (<&>...&>), or JS script tags (...`) are invalid for default PHP execution.