Books MVC ASP.NET C# SQL Server WCF Written Test HR Round Subscribe C# Videos C# Programs Buy DVD

Basic C# Interview Questions on arrays

What is an array?
An array is a data structure that contains several variables of the same type.

What are the 3 different types of arrays?
1.
Single-Dimensional
2. Multidimensional
3. Jagged

Arrays - Video


What is Jagged Array?
A jagged array is an array of arrays.

Are arrays value types or reference types?
Arrays are reference types.

What is the base class for Array types?
System.Array

Can you use foreach iteration on arrays in C#?
Yes,Since array type implements IEnumerable, you can use foreach iteration on all arrays in C#.

5 comments:

  1. Why we don't include Main() in namespace definition? If we use Main() in namespace then will that cause any error?

    ReplyDelete
  2. arrays are of two types

    1. single dimensional array
    2. multi-dimensional array

    multi-dimensional array are of two type

    1. jagged array: whose rows and columns are not equal...
    2. Rectangular array: whose rows and columns are equal

    ReplyDelete
  3. what is the difference between object and pointer?

    ReplyDelete
  4. Sir,all your existing videos are so good.sir please upload some videos on wcf debugging.thanks in advance.Sukumar M.

    ReplyDelete

If you are aware of any other C# questions asked in an interview, please post them below. If you find anything missing or wrong, please feel free to correct by submitting the form below.

 
Disclaimer - Terms of use - Contact Us