Code: Select all
#include <stdio.h>
#include <stdlib.h>
// void increment_func(int&);
void increment_func(int& x)
{
x++;
// return;
}
void incr_func(int* x)
{
(*x)++;
}
void main()
{
int int1;
printf ("integer 1:");
scanf("%d",&int1);
increment_func(int1);
printf ("integer 1: %d",int1);
incr_func(&int1);
printf ("integer 1: %d",int1);
return;
}