G
George_K
Consider this lines of code:
*int make_array();
void get_array(int *array_pointer);
*int make_array()
{
int i;
array[20];
for(i=0,i<=19,i++)
{
array=i;
}
return array;
}
void get_array(int *array_pointer)
{
for(i=0,i<=19,i++)
{
printf("%d",*array_pointer);
array_pointer++;
}
}
get_array(make_array());
I made this code in order to make my question.
Does the last line of code make sence?
Does the array exists when make array has ended?
When i run such code i don't have a problem.
Am i lucky that the items are still there and unchanged?
*int make_array();
void get_array(int *array_pointer);
*int make_array()
{
int i;
array[20];
for(i=0,i<=19,i++)
{
array=i;
}
return array;
}
void get_array(int *array_pointer)
{
for(i=0,i<=19,i++)
{
printf("%d",*array_pointer);
array_pointer++;
}
}
get_array(make_array());
I made this code in order to make my question.
Does the last line of code make sence?
Does the array exists when make array has ended?
When i run such code i don't have a problem.
Am i lucky that the items are still there and unchanged?