Quiz Yourself on Arrays
Test your understanding of the material related to arrays and pointers.
We'll cover the following...
We'll cover the following...
Arrays and pointers
1.
Given the following code:
#include <stdio.h>
int x[5];
int main()
{
int y[3];
static int z[2] = {0, 1};
return 0;
}
Where are x, y, and z stored?
A.
xis placed inside thedatasection.yis placed on the stack.zis placed inside thebsssection.
B.
xis placed inside thebsssection.yis placed on the stack.zis placed inside thedatasection.
C.
xis placed inside thedatasection.yis placed in thedatasection.zis placed inside thebsssection.
D.
xis placed inside thedatasection.yis placed on the stack.zis placed on the stack.
1 / 5