Arrays Questions in C#

By
1. ) What is an array?                                                                                                        
An array is a kind of variable which can hold multiple variable for same data type.

2. ) What are the steps involve for creation of an array?                                         
  • Declaration of Arrays
  • Creation of Arrays
  • Initialization of Arrays
3. ) What is the syntax for declaration of an array?                                                  
 type [ ] arrayname;
4. ) What is the syntax for creation of an array?                                                       
arrayname = new type[size];

5. ) What is the syntax for initialization of an array?                                               
arrayname[subscript]=value;

6. ) How can calculate the length of an array?                                                           
int a = array.Length;

7. ) What is the default value of a numeric array?                                                    
Zero (0)

8. ) Which type of array can not access to the method of System.class?              
Jagged arrays
More Details..

9. ) When we create an Array ,its automatically inherit from System.Array class? 
True

10. ) When we create an ArrayList ,its automatically inherit from System.Collections class?
True

11. ) What are the method commonly used in System.Array class?                      
  • Length
  • CopyTo
  • Clear
  • GetValue()
  • SetValue()
  • Sort()
  • Reverse()

12. ) What are the types of Arrays in C#?                                                                     
  • Single Dimensional array
  • Multi Dimensional array

13. ) What are the types of Multi Dimensional Arrays in C#?                                 
  • Rectangle array
  • Jagged array (variable size array)
14. ) What is Rectangle Array in C#?                                                                            
An array in which each row has same column ,is known as Rectangle Array.

15. ) What is Jagged Array in C#?                                                                                 
Jagged array is an array of array.In which each Row has different size of column. It is also called Variable-size of Array.
More Details..

0 comments:

Post a Comment

Powered by Blogger.