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
-
Common Learning Reader
-
Combined Language Runtime
-
Common Language Runtime
-
Common Learning Runtime
C
Correct answer
Explanation
The Common Language Runtime (CLR) is the virtual machine component of .NET that manages code execution, memory management, exception handling, and security. It provides a runtime environment for .NET applications.
C
Correct answer
Explanation
Android applications are primarily written in Java (or Kotlin). While the OS itself uses C/C++ for system-level components, the official app development language has been Java since the beginning.
-
Python
-
PHP
-
CORBA
-
None of these
A
Correct answer
Explanation
Python is a high-level programming language created by Guido van Rossum (note: the question misspells his name as 'Von Russom'). It emphasizes code readability and supports multiple programming paradigms.
-
Obfuscation
-
pre verification
-
compilation
-
locale
A
Correct answer
Explanation
Code obfuscation deliberately makes software difficult to understand by transforming it into an equivalent but harder-to-read form. This protects intellectual property and makes reverse engineering significantly more challenging. Pre-verification, compilation, and locale are standard development processes not designed to prevent analysis.
-
Java environment
-
Phython environment
-
VC++ environment
-
C++ environment
A
Correct answer
Explanation
i-appli (or i-appli) is NTT DoCoMo's Java platform for mobile phones, and it is indeed based on CLDC. It provides a Java environment for mobile applications, not Python, VC++, or C++ environments.
-
M21
-
JAVA 1
-
JAVA 2
-
CPP1
-
CPP2
-
.NET
-
Assembler
-
Compiler
-
Loader
-
Interpreter
-
Beginner's All Purpose Symbolic Instruction Code
-
Business All Purpose Symbolic Instruction Code
-
Beginner's All Purpose Scientific Instruction Code
-
Business All Purpose Scientific Instruction Code
A
Correct answer
Explanation
BASIC stands for Beginner's All-purpose Symbolic Instruction Code. It was designed in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College to be easy for beginners to learn.
-
VB Script
-
Java Script
-
Action Script
-
Pearl
C
Correct answer
Explanation
ActionScript is the programming/scripting language used in Adobe Flash for creating interactive content and applications. VB Script is for Windows automation, JavaScript is for web browsers, and Pearl (Perl) is a general-purpose scripting language - none are native to Flash.
-
3
-
4
-
4.75
-
Compiler error declaration not allowed
A
Correct answer
Explanation
The code calculates 23 % 4 (modulo operation). 23 divided by 4 is 5 with remainder 3, so 23 % 4 = 3. The variables x and y are declared as bytes but unused, and z is correctly declared as int to store the result.
-
int i; /*above main() */
-
extern int i; /*inside main() */
-
Both 1 & 2
-
option 3 if i is defined elsewhere.
D
Correct answer
Explanation
The code uses variable 'i' without declaring it. Options 1 and 2 alone are insufficient. Option 3 (declaring i as extern inside main) requires i to be defined elsewhere globally - that's what D specifies, making it correct.
-
output i=0 j=20
-
output j=20
-
compiler error starting from "printf("i = %d",op.i);"
-
compiler error starting at the end of struct io
D
Correct answer
Explanation
C structs cannot have member initialization at declaration (int i=0 is invalid). This causes a compiler error at struct definition time, not at the printf statements.
A
Correct answer
Explanation
The program compiles. i=0, j=++i makes j=1 and i=1, so j>i is false. The recursive call never executes, but compilation succeeds regardless. Runtime behavior doesn't affect compilation.
-
Value of float variable f is :12.3
-
Value of float variable f is :12
-
error found on the line "float f =12.3;"
-
none of the above
C
Correct answer
Explanation
In Java, floating-point literals like 12.3 are treated as double by default (64-bit). To assign them to a float variable (32-bit), you must either use the 'f' suffix (12.3f) or cast the value. Without this, the compiler will flag an error due to potential loss of precision from double to float.
-
no compilation error;but no output will be displayed
-
inner=3 outer=1
-
inner=2 outer=1
-
compile error