What happens when you attempt to compile and run the following code?

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;
}
A. Error: in prototype declaration unknown struct person
B. Error: in structure
C. It prints: Steve 31
D. None of these

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.