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.

53 lines
614 B

#include <stdio.h>
#include "ex22.h"
#include "dbg.h"
int THE_SIZE = 1000;
static int THE_AGE = 37;
int get_age()
{
return THE_AGE;
}
int *get_age_pointer()
{
return &THE_AGE;
}
void set_age(int age)
{
THE_AGE = age;
}
double *get_function_static(double to_add)
{
static double value = 1.0;
double old = value;
value = value + to_add;
return &value;
}
double update_ratio(double new_ratio)
{
static double ratio = 1.0;
double old_ratio = ratio;
ratio = new_ratio;
return old_ratio;
}
void print_size()
{
log_info("I think size is: %d", THE_SIZE);
}