What happens when you attempt to compile and run the following code?
#include
using namespace std;
void set(struct person*);
struct person
{
char name[25];
int age;
};
int main()
{
struct person e = {"Steve", 30};
set(&e);
cout<< e.name << " " << e.age;
return 0;
}
void set(struct person *p)
{
p?>age = p?>age + 1;
}
Micaela
3 days agoLeota
10 days agoMicaela
12 days ago