[SOLVED] Program that asks the user for the name of the file

7.00 $

Programming resource
, Digital learning resource
Categories: ,
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)
The Linux system call stat provides information of a specific file on the hard drive. More information about this system call can be found on the Internet or by typing man 2 stat on the Linux shell.

Your task is to use stat to write a program that asks the user for the name of the file, which is located in  the same directory as the executable, and displays the size of that file in bytes.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.