Hi,
hope you never mind. you are passing length of array like this. int array[6]= { 1, 2, 3, 4, 5, 6 };
change above line of initlization of array into
int array[]= { 1, 2, 3, 4, 5, 6 };
now find size of array.
dude you are passing hardcode length 6 that's why you are able to calculate.what I would do when I dont know how many length in array, a user passing
thanks
Array in cRashida Bohri January 28, 2012 at 8:18 PM
more preciselyjoon June 25, 2011 at 11:23 PM
int len=sizeof(array)/sizeof(array[0]);
array programs in asp.netbollinger October 7, 2011 at 4:15 PM
simple programs in asp.net
assending desending in arraykhushi December 14, 2011 at 1:42 PM
please learn more about array & this subject.
assending desending in array.kushi December 14, 2011 at 1:46 PM
please give me a ans for this subject.
wrong calculation in size of arrayshahgeb December 23, 2011 at 5:03 PM
Hi, hope you never mind. you are passing length of array like this. int array[6]= { 1, 2, 3, 4, 5, 6 }; change above line of initlization of array into int array[]= { 1, 2, 3, 4, 5, 6 }; now find size of array. dude you are passing hardcode length 6 that's why you are able to calculate.what I would do when I dont know how many length in array, a user passing thanks
Array in cRashida Bohri January 28, 2012 at 8:18 PM
why the index position of array starts from 0?
about size of arrayTanvir March 24, 2012 at 5:22 AM
great, thank you for your code.
aceace September 26, 2012 at 8:58 AM
it's so difficult for me in using array in program
Post your Comment