C++ Programing help: Consider the following code. What would be the output of th
ID: 3859757 • Letter: C
Question
C++ Programing help: Consider the following code. What would be the output of the program?
#include <iostream>
#include <string>
using namespace std;
typedef struct
{
char szFirstName[16];
char szLastName[16];
char szMiddleName[16];
int nAge;
} CONTACT;
int main(int argc, char *argv[], char *envp[])
{
char szBuffer[1024];
CONTACT * pContact = (CONTACT *)1000;
pContact++;
sprintf_s(szBuffer, sizeof(szBuffer), "Address: 0x%08X", (long)pContact);
cout << szBuffer << endl;
return 0;
}
Explanation / Answer
The above program is comes with an error message
i.e
output:
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.