You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
375 B
39 lines
375 B
15 years ago
|
|
||
|
void foo(int);
|
||
|
|
||
|
void set_value(int* i)
|
||
|
{
|
||
|
*i = 10;
|
||
|
}
|
||
|
|
||
|
void modify(int* i)
|
||
|
{
|
||
|
*i = 15;
|
||
|
}
|
||
|
|
||
|
void read(int* i)
|
||
|
{
|
||
|
static int i2;
|
||
|
i2 = *i;
|
||
|
}
|
||
|
|
||
|
int test_main(int* i)
|
||
|
{
|
||
|
foo(5);
|
||
|
set_value(i);
|
||
|
|
||
|
modify(i);
|
||
|
read(i);
|
||
|
|
||
|
for(unsigned j = 0; j < 10; ++j)
|
||
|
foo(j);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int var;
|
||
|
return test_main(&var);
|
||
|
}
|