This C# Programming Language Practice Test assesses key skills in handling data types, parsing methods, and understanding object-oriented concepts like interfaces and arrays. It's designed for learners to test their C# proficiency, enhancing both academic and professional development.
A.Int c = a+b;
B.String c = a + b;
C.Int c = Convert.ToInt32(a) + b;
D.Int c = Convert.ToInt32(a+b);
Rate this question:
CTS
CLR
CLS
CSS
Rate this question:
It provides core services such as memory management, thread management, and remoting.
It enforces strict type safety.
It provides Code Access Security
It provides Garbage Collection Services
All the above
Rate this question:
Out
Ref
Params
Value
All the above
Rate this question:
The conditional operator (?:) returns one of two values depending on the value of a Boolean expression.
The &* operator is also used to declare pointer types and to dereference pointers.
In addition to being used to specify the order of operations in an expression, brackets [ ] are used to specify casts or type conversions.
Rate this question:
A.True
B.False
Rate this question:
True
False
Rate this question:
If (Condition1) {// Some statement}
If (Condition1) {// Some statement} else {// Some statement}
If (Condition1) {// Some statement} else {// Some statement} else if ( Condition2){//Some statement}
If ( Condition1 ) {// Some statement} else if ( Condition2 ) {// Some statement} else {// Some statement}
If ( Condition1 ) {// Some statement} else if ( Condition2 ) {// Some statement} else if ( Condition3 ) {// Some statement} else {// Some statement}
Rate this question:
ARE
CRE
CR
REA
CREATED
Rate this question:
A.Convert.ToString(str) function handles NULL while str.ToString() does not. It will throw a NULL reference exception.
B.str.ToString() function handles NULL while Convert.ToString(str) does not. It will throw a NULL reference exception.
C.Both can handle NULL
D.None can Handle NULL
Rate this question:
Finally block is executed even if an error occurs
Finally block is definitely executed when leaving a try block.
Finally block is used to perform any necessary clean-up jobs.
Finally block is not executed if an error occurs
Rate this question:
Infinite
1
2
0
None of these
Rate this question:
A.Yes
B.No
C.It can be instantiated with static constructor
D.None of these
Rate this question:
1
0
Depends upon how many params arguments does it use.
Any number of values
Depends upon how many ref arguments does it use.
Rate this question:
Char
Long
Short
Byte
Integer
Rate this question:
String s1 = "String"; String s2; s2 = s1;
String s1 = "String" ; String s2; s2 = String.Concat(s1, s2);
String s1 = "String"; String s2; s2 = String.Copy(s1);
String s1 = "String"; String s2; s2 = s1.Replace();
String s1 = "String"; String s2; s2 = s2.StringCopy(s1);
Rate this question:
.NET class libraries
Common Language Runtime
Common Language Infrastructure
Component Object Model
Common Type System
Rate this question:
Static
Protected
Private
Shared
Public
Rate this question:
Variables cannot be assigned to enum elements.
Variables can be assigned to any one of the enum elements.
Variables can be assigned only to the first enum element.
Values assigned to enum elements must always be successive values.
Values assigned to enum elements must always begin with 0.
Rate this question:
True
False
Rate this question:
A.Both are Same
B.Int.Parse Can't Handle Null values , It will throws ArgumentNull Exception Error.
C.Convert.ToInt32 Can't Handle Null Values ,it will throws ArgumentNullException error.
D.Both can Handle Null Values
E.Both can't Handle Null Values
Rate this question:
The condition no < 11 will be evaluated only if age > 18 evaluates to True.
The statement a = 25 will get executed if any one condition is True
The condition no < 11 will be evaluated only if age > 18 evaluates to False
The statement a = 25 will get executed if both the conditions are True.
&& is known as a short circuiting logical operator.
Rate this question:
4 byte
8 byte
16 byte
32 byte
Rate this question:
Properties
Methods
Enumerations
Events
Structures
Rate this question:
Possible
ImPossible
System.array can be listed
System.arrayList can be used
Rate this question:
Each value type has an implicit default constructor that initializes the default value of that type.
It is possible for a value type to contain the null value.
All value types are derived implicitly from System.ValueType class.
It is not essential that local variables in C# must be initialized before being used.
Variables of reference types referred to as objects and store references to the actual data.
Rate this question:
Private
Public
Static
Virtual
All the above
Rate this question:
We can assign values of any type to variables of type object.
When a variable of a value type is converted to object, it is said to be unboxed.
When a variable of type object is converted to a value type, it is said to be boxed.
Boolean variable cannot have a value of null.
When a value type is boxed, an entirely new object must be allocated and constructed.
Rate this question:
Function definitions cannot be nested.
Functions can be called recursively.
If we do not return a value from a function then a value -1 gets returned.
To return the control from middle of a function exit function should be used.
Function calls can be nested.
Rate this question:
Use the existing functionality of base class.
Overrride the existing functionality of base class.
Implement new functionality in the derived class.
Implement polymorphic behaviour.
Implement containership.
Rate this question:
Decimal
Single
Double
None
Rate this question:
It provides a language-neutral development & execution environment.
It ensures that an application would not be able to access memory that it is not authorized to access.
It provides services to run "managed" applications
The resources are garbage collected.
It provides services to run "unmanaged" applications.
Rate this question:
The & operator can be used to Invert a bit.
The & operator can be used to put ON a bit.
The & operator can be used to put OFF a bit.
The & operator can be used to check whether a bit is ON.
The & operator can be used to check whether a bit is OFF.
Rate this question:
Instance members of a class can be accessed only through an object of that class.
A class can contain only instance data and instance member function.
All objects created from a class will occupy equal number of bytes in memory.
A class can contain Friend functions.
A class is a blueprint or a template according to which objects are created.
Rate this question:
Quiz Review Timeline (Updated): Mar 18, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.