Question: C++ 1 Task: Assume a system with a 32-bit virtual address and a 4KB page size. Write a C++ program that is passed a virtual
1 Task: Assume a system with a 32-bit virtual address and a 4KB page size. Write a C++ program that is passed a virtual address in decimal) on the command line and have it output the page number (p) and offset (d) for the given address. As an example, your program would run as follows: ./a.out 19986 Your program would output The address 19986 contains: page number 4 offset3602 Writing this program would require you to use an appropriate data type to store 32 bits, which would be unsigned int on the 32-bit machines in the lab
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
