Unix C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.

arrays !!!

2 posters

Go down

arrays !!! Empty arrays !!!

Post by Abhiramy Thu Mar 04, 2010 7:10 pm

wat is the cmnd used to dynamically insert elements in an array???

Abhiramy

Posts : 9
Points : 21
Join date : 2010-02-26

Back to top Go down

arrays !!! Empty to get and display array elements

Post by aarthi Tue Mar 09, 2010 2:24 pm

this is an example for getting elements for an array dynamically and displaying it
echo "enter length"
read n
for (( i=0;i<n;i++ ))
do
read a[i]
done
echo "elemnts are:"
echo ${a[@]}

aarthi

Posts : 12
Points : 22
Join date : 2010-02-26

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum