/*
Displaying process segment addresses
*/
#include <iostream>
extern int etext, edata, end;
using namespace std;
int
main( ){
cout << "Adr etext: " << hex << int(&etext)
<< "\t ";
cout << "Adr edata: " << hex << int(&edata)
<< "\t ";
cout << "Adr end: " << hex << int(&end )
<< "\n";
return 0;
}
please modify this above code and execute to get the output.
Please find the modified code below.
#include <iostream>
extern int etext, edata, end;
//using namespace std;
int main( ){
std::cout << "Adr etext: " << std::hex <<
&etext << "\t ";
std::cout << "Adr edata: " <<std:: hex <<
&edata << "\t ";
std::cout << "Adr end: " << std::hex << &end
<< "\n";
return 0;
}
Get Answers For Free
Most questions answered within 1 hours.