GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  VB.NET
Go To First  |  Previous Question  |  Next Question 
 VB.NET  |  Question 2 of 60    Print  
What are Jagged Arrarys ?

  
Total Answers and Comments: 4 Last Update: April 04, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 13, 2005 05:38:36   #1  
vishalgupta        

RE: What are Jagged Arrarys ?
jagged array is an array inside an array is called a jagged array
 
Is this answer useful? Yes | No
October 18, 2005 09:46:57   #2  
kumaraswamy        

RE: What are Jagged Arrarys ?

v Define Jagged Arrays

The other type of multidimensional array is the jagged array. A two dimensional jagged array can be thought of as a table where each row can have a different number of columns. Take for example a table where families are the rows and family members are the columns. Unless each family has the same number of members each row will have a variable number of columns. You can use a jagged array to represent such a table.

A jagged array is really an array of arrays. To create a jagged array you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets (parentheses).

 
Is this answer useful? Yes | No
April 06, 2006 02:09:11   #3  
kiran        

RE: What are Jagged Arrarys ?

a collection of discrete no of elements in each and every row is called as jagged arrays.

1)these jagged arrays doesnt contain columns

2)a jagged array also called as dynamic array

3)jagged array is a collection of dynamic arrays

4)these are faster and also save the memory.

syntax of jagged array:

int[][]x new int [rows][]

here x is array name


 
Is this answer useful? Yes | No
April 13, 2006 03:22:53   #4  
sonali panda        

RE: What are Jagged Arrarys ?

Jagged Arrays

Another type of multidimensional array Jagged Array is an array of arrays in which the length of each array can differ. Example where this array can be used is to create a table in which the number of columns differ in each row. Say if row1 has 3 columns row2 has 3 columns then row3 can have 4 columns row4 can have 5 columns and so on. The following code demonstrates jagged arrays.

Dim colors(2)() as String
'declaring an array of 3 arrays
colors(0) New String(){ Red blue Green }
initializing the first array to 3 members and setting values
colors(1) New String(){ Yellow Purple Green Violet }
initializing the second array to 4 members and setting values
colors(2) New String(){ Red Black White Grey Aqua }
initializing the third array to 5 members and setting values


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape