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;
}
Han
3 months agoCherrie
2 months agoChi
2 months agoElbert
3 months agoJannette
4 months agoShawnda
2 months agoKenneth
3 months agoDonte
3 months agoLing
4 months agoSabrina
2 months agoAnglea
3 months agoBettina
3 months agoLisha
4 months agoShawnda
3 months agoKizzy
3 months agoDanica
3 months agoDannie
4 months agoTasia
4 months agoKing
4 months agoKing
4 months agoMicaela
4 months agoLeota
4 months agoMicaela
5 months ago