Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step one and two are already done. Kindly do the rest. Thank you Please I need help in operating system by using C++ Run your

Step one and two are already done. Kindly do the rest. Thank you image text in transcribed
image text in transcribed
image text in transcribed
Please I need help in operating system by using C++ Run your program in both x86 (32 bit) and x64 modes and notice the difference in your output Create a console application that perform the following 1. a) Display the size of the following primitive data type: char, short, int long, float, double b) Display the size of a pointer Display the following memory address for your program Beginning data segment Start and End of the program segment. (hint: One of the functions must be an empty function place at the end of the program file, that will be the address of the end of the program segment) Start of the Heap address of the main program Start of the Stock address of the main program 3. Define a function and call it using using a pointer (call back function) 4. Determine and display the start, end and size of the heap memory the operating system allocate to your program 5. Determine and display the start, end and size of the stack memory the operating system allocate to your program. (hint: recursion. If you use the call back function for this, then you satisfy #3 as well) Note: Your program should have 3 functions, a main, a call back function and an empty function For the part (a), I am giving you the code as well as the output I re Note: The code is common to both the compilers. #include using namespace std; int main0 cout #include "stdlib.h> extern char etext, edata int main(int arge, char **argv) printf(" The first address goes beyond: " printf" The segment of the program text %10p ", &etext); print(" The starting addressinitialization or the data segment %10p". &cdata); return 0; the output is as follows The first address goes beyond: The segment of the program text x40062d The starting addressinitialization of the data segment 0x601040 rest of the answers I will upload soon by using some 32 bit system hope this will help you for the starting Please I need help in operating system by using C++ Run your program in both x86 (32 bit) and x64 modes and notice the difference in your output Create a console application that perform the following 1. a) Display the size of the following primitive data type: char, short, int long, float, double b) Display the size of a pointer Display the following memory address for your program Beginning data segment Start and End of the program segment. (hint: One of the functions must be an empty function place at the end of the program file, that will be the address of the end of the program segment) Start of the Heap address of the main program Start of the Stock address of the main program 3. Define a function and call it using using a pointer (call back function) 4. Determine and display the start, end and size of the heap memory the operating system allocate to your program 5. Determine and display the start, end and size of the stack memory the operating system allocate to your program. (hint: recursion. If you use the call back function for this, then you satisfy #3 as well) Note: Your program should have 3 functions, a main, a call back function and an empty function For the part (a), I am giving you the code as well as the output I re Note: The code is common to both the compilers. #include using namespace std; int main0 cout #include "stdlib.h> extern char etext, edata int main(int arge, char **argv) printf(" The first address goes beyond: " printf" The segment of the program text %10p ", &etext); print(" The starting addressinitialization or the data segment %10p". &cdata); return 0; the output is as follows The first address goes beyond: The segment of the program text x40062d The starting addressinitialization of the data segment 0x601040 rest of the answers I will upload soon by using some 32 bit system hope this will help you for the starting

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions