Decimal
Single
Double
None
A.Int c = a+b;
B.String c = a + b;
C.Int c = Convert.ToInt32(a) + b;
D.Int c = Convert.ToInt32(a+b);
A.True
B.False
A.Yes
B.No
C.It can be instantiated with static constructor
D.None of these
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
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
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.
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.
Char
Long
Short
Byte
Integer
4 byte
8 byte
16 byte
32 byte
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.
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.
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.
.NET class libraries
Common Language Runtime
Common Language Infrastructure
Component Object Model
Common Type System
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
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.
1
0
Depends upon how many params arguments does it use.
Any number of values
Depends upon how many ref arguments does it use.
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.
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}
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.
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.
Static
Protected
Private
Shared
Public
ARE
CRE
CR
REA
CREATED
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);
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