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
-
variant
-
voriant
-
var
-
varient
A
Correct answer
Explanation
VBScript's default data type is 'variant', which can hold any type of data. The other options are misspellings: voriant (typo), var (JavaScript-like), varient (misspelled). The correct answer is A (variant).
-
Item()
-
Key()
-
CompareMode()
-
Exists()
-
System.Object
-
System.Type
-
System.Console
-
System.Enum
-
System.Environment
A
Correct answer
Explanation
This is the ultimate base class of all classes in the .NET Framework. It is the root of the type hierarchy.
-
IndexOutOfRangeException
-
OverflowException
-
ArrayMemoryException
-
ArrayTypeMismatchException
-
Exception
C
Correct answer
Explanation
There is no such exception as 'ArrayMemoryException' in C#.
-
DeleteAt()
-
RemoveFrom()
-
DeleteIndex()
-
RemoveAt()
-
DeleteFrom()
D
Correct answer
Explanation
To remove an item from a particular index, the correct function is 'RemoveAt(int index)'.
-
msgbox.show()
-
MessageBox.Show()
-
Msgbox()
-
msgBox.show()
-
MessageBoxShow()
B
Correct answer
Explanation
A message box is used to displays the specified text in a small window containing one or more buttons.
-
lock
-
volatile
-
out
-
namespace
-
form
E
Correct answer
Explanation
Form is not a keyword in C#. It represents a visual window or frame that can be used to place user interface controls like buttons, labels or listbox.
-
setName()
-
isName()
-
Name
-
Start()
-
getName()
C
Correct answer
Explanation
Each thread has a Name property that we can set for the benefit of debugging. We can set the name of a thread only once. Naming a thread has its advantages while debugging an application.
-
StringBuilder represents a mutable string of characters.
-
StringBuilder should be used when we want to make a significant number of changes to a string.
-
If characters are added to the StringBuilder object, its length increases at runtime.
-
We should always use StringBuilder in place of String.
-
We can remove characters from a StringBuilder at runtime.
D
Correct answer
Explanation
Although the StringBuilder class generally offers better performance than the String class, we should not always replace String with StringBuilder. It depends on whether we want to edit the string during the runtime or not.
-
Garbage collection
-
Structured exception handling
-
Allows creation of multithreaded, scalable applications
-
Use of delegates instead of function pointers for increased type safety and security
-
Support for ADO.NET
E
Correct answer
Explanation
ADO.NET is an object-oriented set of libraries that allows you to interact with data sources. It cannot be said as an advantage of CLR.
-
Function definitions can be nested.
-
A function can only return one value at a time.
-
To return the control from middle of a function, the return clause should be used.
-
Function calls can be nested.
-
Functions can be called recursively.
A
Correct answer
Explanation
We can call a function from within another function but we cannot define a function inside another. The functions must be defined independent of each other.
-
DragDrop Event
-
DragMode Property
-
DragOver Event
-
None of these
C
Correct answer
Explanation
This event occurs after the drag and a drop operation is in progress.
-
ScaleTop
-
ScaleWidth
-
ScaleLeft
-
None of these
C
Correct answer
Explanation
This scaling property of control supports graphics such as form, picture box and image control, which returns the horizontal coordinates for the left edges of an object.
-
Load
-
Unload
-
Show
-
None of these
C
Correct answer
Explanation
Show method of the form is used to display the forms loaded into memory.
-
Query unload
-
Load
-
Activate
-
None of these
A
Correct answer
Explanation
This form event is fired before the form closes to give you a chance to cancel the unloading of the forms.