# HackerRank Array Manipulation Quiz-2

Question 1

Time: 00:00:00
When you passed an array as an argument to the function then what does it mean  ?

Base address of the array of first element

Base address of the array of first element

Base address of the array of last element

Base address of the array of last element

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 2

Time: 00:00:00
#include<stdio.h>

int main()

{

int a[8][9];

fun(f);

return 0;

}

Define fun() in the code as :-

void fun(int *p[9]) {}

void fun(int *p[9]) {}

void fun(int p[]*[9]) {}

void fun(int p[]*[9]) {}

void fun(int p[][9]) {}

void fun(int p[][9]) {}

void fun(int *p[3][9]) {}

void fun(int *p[3][9]) {}

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 3

Time: 00:00:00
Is a pointer to a block of memory effectively the same as an array?

Yes

Yes

No

No

Depends

Depends

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 4

Time: 00:00:00
How  to find the 6th element from the given code below ?
```int ar[60];
int *p;
p = a;```

a[5]

a[5]

p[5]

p[5]

*(a+5)

*(a+5)

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 5

Time: 00:00:00
Are the expressions arr and &arr same for an array of 16 integers?

Yes

Yes

No

No

Depends

Depends

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 6

Time: 00:00:00
What is output of the code ?

int main()

{

int a[5]={1,3,6};

printf("%d",a[4]);

}

Initialization of elements is not correct

Initialization of elements is not correct

0

0

Compile time error

Compile time error

Syntax error

Syntax error

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 7

Time: 00:00:00
How to access elements in an array?

randomly

randomly

sequentially

sequentially

exponentially

exponentially

partially

partially

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 8

Time: 00:00:00
```int main()
{
int a,b,c;
int ar[5]={11,1,16,2,7};
a  = ++ar[1];
b  = ar[1]++;
c = ar[a++];
printf("%d %d %d",a,b,c);
}

What is the output of this code?```

2,2,2

2,2,2

3,2,16

3,2,16

2,3,16

2,3,16

2,3,2

2,3,2

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 9

Time: 00:00:00
int main()

{

char a;

char arr[7] = {10,11,12,13,14,15,17};

a = (arr+3) [3];

printf(“%d”,a);

}

What will be the output of this code?

12

12

13

13

15

15

17

17

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 10

Time: 00:00:00
What is the maximum dimension that an array can have is :-

theoretically it has no limit but practically limit depends on memory

theoretically it has no limit but practically limit depends on memory

depends on multidimensional array

depends on multidimensional array

1-D array

1-D array

None

None

Once you attempt the question then PrepInsta explanation will be displayed.