C Programming: Write a separate program that takes one command line argument indicating a binary stack file (e.g., stack.bin). Provide an appropriate error message in case of a missing filename or error opening it. The sample output is shown below that it must print out. Show the full code with the sample output being run in the terminal. There must be no errors at all. Sample Output: function: 0x5639db7fc2ca, caller: 0x7f8b8f372290, frame pointe
C
Write a separate program that takes one command line argument indicating a binary stack file (e.g., stack.bin). Provide an appropriate error message in case of a missing filename or error opening it. The sample output is shown below that it must print out. Show the full code with the sample output being run in the terminal. There must be no errors at all.
Sample Output:
function: 0x5639db7fc2ca, caller: 0x7f8b8f372290, frame pointer: 0x7ffd23831070
stack frame: 0x7ffd23831080-0x7ffd23831070, time: 0.003484 (2158-5642)
address range initial final
0x7ffd2383107f-0x7ffd2383107c: 00007f8b | 00007f8b
0x7ffd2383107b-0x7ffd23831078: 8f372290 | 8f372290
0x7ffd23831077-0x7ffd23831074: 00000000 | 00000000
0x7ffd23831073-0x7ffd23831070: 00000001 | 00000001
function: 0x5639db7fc1d9, caller: 0x5639db7fc2f3, frame pointer: 0x7ffd23831050
stack frame: 0x7ffd23831060-0x7ffd23831030, time: 0.002587 (2173-4760)
address range initial final
0x7ffd2383105f-0x7ffd2383105c: 00005639 | 00005639
0x7ffd2383105b-0x7ffd23831058: db7fc2f3 | db7fc2f3
0x7ffd23831057-0x7ffd23831054: 00007ffd | 00007ffd
0x7ffd23831053-0x7ffd23831050: 23831070 | 23831070
0x7ffd2383104f-0x7ffd2383104c: bbc0f880 | bbc0f880
0x7ffd2383104b-0x7ffd23831048: 778a2800 | 778a2800
0x7ffd23831047-0x7ffd23831044: 00000000 | 03030303
0x7ffd23831043-0x7ffd23831040: 00000000 | 03030303
0x7ffd2383103f-0x7ffd2383103c: 00005639 | 03035639
0x7ffd2383103b-0x7ffd23831038: db7fc2ca | 89abcdef
0x7ffd23831037-0x7ffd23831034: 00007f8b | 0000000a
0x7ffd23831033-0x7ffd23831030: 8f372290 | 000186a0
function: 0x5639db7fc1d9, caller: 0x5639db7fc29d, frame pointer: 0x7ffd23831010
stack frame: 0x7ffd23831020-0x7ffd23830ff0, time: 0.001733 (3015-4748)
address range initial final
0x7ffd2383101f-0x7ffd2383101c: 00005639 | 00005639
0x7ffd2383101b-0x7ffd23831018: db7fc29d | db7fc29d
0x7ffd23831017-0x7ffd23831014: 00007ffd | 00007ffd
0x7ffd23831013-0x7ffd23831010: 23831050 | 23831050
0x7ffd2383100f-0x7ffd2383100c: bbc0f880 | bbc0f880
0x7ffd2383100b-0x7ffd23831008: 778a2800 | 778a2800
0x7ffd23831007-0x7ffd23831004: 00007ffd | 02020202
0x7ffd23831003-0x7ffd23831000: 23831050 | 02020202
0x7ffd23830fff-0x7ffd23830ffc: 00007ffd | 02027ffd
0x7ffd23830ffb-0x7ffd23830ff8: 23831188 | 89abcdef
0x7ffd23830ff7-0x7ffd23830ff4: 00005639 | 0000000a
0x7ffd23830ff3-0x7ffd23830ff0: db7fc2f3 | 000186a0
function: 0x5639db7fc1d9, caller: 0x5639db7fc29d, frame pointer: 0x7ffd23830fd0
stack frame: 0x7ffd23830fe0-0x7ffd23830fb0, time: 0.000851 (3883-4734)
address range initial final
0x7ffd23830fdf-0x7ffd23830fdc: 00005639 | 00005639
0x7ffd23830fdb-0x7ffd23830fd8: db7fc29d | db7fc29d
0x7ffd23830fd7-0x7ffd23830fd4: 00007ffd | 00007ffd
0x7ffd23830fd3-0x7ffd23830fd0: 23831010 | 23831010
0x7ffd23830fcf-0x7ffd23830fcc: bbc0f880 | bbc0f880
0x7ffd23830fcb-0x7ffd23830fc8: 778a2800 | 778a2800
0x7ffd23830fc7-0x7ffd23830fc4: 00007ffd | 01010101
0x7ffd23830fc3-0x7ffd23830fc0: 23831010 | 01010101
0x7ffd23830fbf-0x7ffd23830fbc: 00007ffd | 01017ffd
0x7ffd23830fbb-0x7ffd23830fb8: 23831188 | 89abcdef
0x7ffd23830fb7-0x7ffd23830fb4: 00005639 | 0000000a
0x7ffd23830fb3-0x7ffd23830fb0: db7fc29d | 000186a0
function: 0x5639db7fc1d9, caller: 0x5639db7fc2fd, frame pointer: 0x7ffd23831050
stack frame: 0x7ffd23831060-0x7ffd23831030, time: 0.000851 (4781-5632)
address range initial final
0x7ffd2383105f-0x7ffd2383105c: 00005639 | 00005639
0x7ffd2383105b-0x7ffd23831058: db7fc2fd | db7fc2fd
0x7ffd23831057-0x7ffd23831054: 00007ffd | 00007ffd
0x7ffd23831053-0x7ffd23831050: 23831070 | 23831070
0x7ffd2383104f-0x7ffd2383104c: bbc0f880 | bbc0f880
0x7ffd2383104b-0x7ffd23831048: 778a2800 | 778a2800
0x7ffd23831047-0x7ffd23831044: 03030303 | 01010101
0x7ffd23831043-0x7ffd23831040: 03030303 | 01010101
0x7ffd2383103f-0x7ffd2383103c: 03035639 | 01015639
0x7ffd2383103b-0x7ffd23831038: 89abcdef | 89abcdef
0x7ffd23831037-0x7ffd23831034: 0000000a | 0000000a
0x7ffd23831033-0x7ffd23831030: 000186a0 | 000186a0
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)