Thought of the Day : "Every affliction has its own rich lesson to teach, if we would learn it."          Hurray!!!! Bestdotnettraining.com announces offer of the month i.e. 30% off on LINQ and Entity Framework.            Join google groups deccansoft-support@googlegroups.com for asking any question about the Technology.

Interview Question

Select Courses

Questions
 

1) 
  What data type should be used when we want to store any type of data?
  1. int
  2. float
  3. double
  4. object

Answer



Explanation:

All predefined and user-defined types inherit from the object type.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

2) 
  What is an Immutable variable?
  1. An object whose value cannot be changed once it is set.
  2. type An object whose value can be changed once it is set.
  3. Both

Answer



Explanation:

It is the object whose value cannot be modified once the value is assigned.
Example String Variable.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

3) 
  Which Exception is thrown when a variable on RHS is casted to and is not as of type on LHS?
  1. Invalid cast Exception
  2. Argument Null Exception
  3. Application Exception
  4. System Exception

Answer



Explanation:

The InvalidCastException occurs when an explicit cast is applied to a type that is not in the same path of the type hierarchy.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

4) 
  What is the default value of the first enum member?
  1. 1
  2. 0

Answer



Explanation:

The default value for an enum is 0 -- even if that is not a valid value for that enum. It cannot be changed.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

5) 
  _______ is the term used to describe the transformation from Value Type to reference type.
  1. Boxing
  2. UnBoxing
  3. Implicit Casting
  4. Explicit Casting

Answer



Explanation:

Boxing refers to the conversion of Value type to an Object (Reference type).
Unboxing means conversion of Object to Value type.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

6) 
  class Program
{
static void Main(string[ ] args)
{
int n; char chr;
chr = (char)(65);
Console.WriteLine(chr);
chr = 'a';
n = (int)(chr);
Console.WriteLine(n);
}
}

  1. 65, a
  2. a, 65
  3. A, 97
  4. 65, A

Answer



Explanation:

As per ASCII Code A=65 to Z= 90 and a=97 to z=122 here casting is done.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

7) 
  Can a decimal be categorized as floating point datatype?
  1. Yes
  2. No

Answer



Explanation:

The decimal allows digits after decimal point, the number of digits are fixed unlike float where number of digits are not fixed.

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

8) 
  What is the type of a Structure?
  1. Reference Type
  2. Value Type

Answer



Explanation:

Value types directly holds the value from the stack memory

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

9) 
  What are the operators supported in C# not in VB.Net?
  1. ++, --
  2. ? :, <<, >>
  3. ==, sizeof
  4. All the above

Answer



Explanation:

Sorry, there is no explanation for this question

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

10) 
  How to iterate loop infinitely?
  1. set condition (true)
  2. set condition (false)
  3. Both

Answer



Explanation:

Ex: set condition (true) that does not change,

while(true)

{

//Code block here...

}

Share with your friend
To:
Post your views
View Answer      Post Your Comment     
Give your rating:

1 of 160 Next Last
 
Goto Page:

spacer
Content
Post your Enquiry
 
captcha


How can we improve Bestdotnettraining?
 
captcha


LiveZilla Live Chat Software