Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Some noob questions regarding 2 dime array... pls... help me :( (http://www.go4expert.com/forums/noob-questions-regarding-2-dime-array-t1201/)

cuty_nikka 14Aug2006 20:02

Some noob questions regarding 2 dime array... pls... help me :(
 
plz help me :( .. i cant find the answers on google :(

1. What is the other term used to refer to a two dime array?

2. If an array has been declared as arr[4][3], how many elements do
you have?

3. An array should always start its index at zero?

4. The statement int arr[20]={1,2}; is a valid statement?

5. The last allowable index to be used in an array is size-1?

6. What do you call a data structure having a sequence of elements of the
same type?

7. In the statement int arr[30]={1,2,3}; what is the size of the array?

8. An array which is automatically expanded to accommodate new objects
if filled beyond its current size?

9. The function call displayMe(arr[5]); is a valid statement?

10. The function header void displayME(arr,size); is a valid statement?

11. Is an array a data structure or an algorithm?

12. The shrinking and expanding of the memory allocation of a dynamic
array is similar to what other data structure?

13. You cannot use an array without declaring first the header file
conio.h?

14. What is the initial value of an array when declared inside a function?

shabbir 14Aug2006 20:36

Re: Some noob questions regarding 2 dime array... pls... help me :(
 
Quote:

Originally Posted by cuty_nikka
1. What is the other term used to refer to a two dime array?

vector or list

Quote:

Originally Posted by cuty_nikka
2. If an array has been declared as arr[4][3], how many elements do
you have?

12

Quote:

Originally Posted by cuty_nikka
3. An array should always start its index at zero?

in C++ yes

Quote:

Originally Posted by cuty_nikka
4. The statement int arr[20]={1,2}; is a valid statement?

Yes

Quote:

Originally Posted by cuty_nikka
5. The last allowable index to be used in an array is size-1?

Yes

Quote:

Originally Posted by cuty_nikka
6. What do you call a data structure having a sequence of elements of the same type?

Array

Quote:

Originally Posted by cuty_nikka
7. In the statement int arr[30]={1,2,3}; what is the size of the array?

30.

Quote:

Originally Posted by cuty_nikka
8. An array which is automatically expanded to accommodate new objects if filled beyond its current size?

Vector

Quote:

Originally Posted by cuty_nikka
9. The function call displayMe(arr[5]); is a valid statement?

Yes

Quote:

Originally Posted by cuty_nikka
10. The function header void displayME(arr,size); is a valid statement?

No. It should be datatype and not arr and size

Quote:

Originally Posted by cuty_nikka
11. Is an array a data structure or an algorithm?

Data structure

Quote:

Originally Posted by cuty_nikka
12. The shrinking and expanding of the memory allocation of a dynamic array is similar to what other data structure?

Vector/list

Quote:

Originally Posted by cuty_nikka
13. You cannot use an array without declaring first the header file
conio.h?

not true.

Quote:

Originally Posted by cuty_nikka
14. What is the initial value of an array when declared inside a function?

garbage.


All times are GMT +5.5. The time now is 05:19.