WorksheetsDay 6 Array
Total questions: 10
Worksheet time: 8mins
An entire array is always passed by ___ to a called function.
A) Call by value
B) Call by reference
C) Address relocation
D) Address restructure
What does the following declaration mean?
int (*ptr)[10];
ptr is array of pointers to 10 integers
ptr is a pointer to an array of 10 integers
ptr is an array of 10 integers
ptr is an pointer to array
2,1,15
1,2,5
3,2,15
2,3,20
2, 3, 4, 5
1, 2, 3, 4
0, 1, 2, 3
3, 2, 1 0
5
4
6
7
A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal. The starting address of A[49] is
1167
1164
1264
1169
Minimum number of interchange needed to convert the array 89,19,40,14,17,12,10,2,5,7,11,6,9,70, into a heap with the maximum element at the root is
0
1
2
3
Minimun number of comparison required to compute the largest and second largest element in array is
n-[log₂n]-2
n+[log₂n-2]
log₂n
None of these
If storage class is missing in the array definition, by default it will be taken to be
automatic
external
static
either automatic or external depending on the place of occurrence
he following program
main( )
{
static int a[ ] = { 7, 8, 9 } ;
printf( "%d", 2[ a ] + a[ 2 ] ) ;
}
results in bus error
results in segmentation voilation error
will not compile successfully
none of these
