What system function returns the size of a file?
Question 1 options:
stat |
|
open |
|
read |
|
length |
Question 2 (1 point)
What function permits you to change a file's permissions?
Question 2 options:
chown |
|
chmod |
|
perms |
|
stat |
Question 3 (1 point)
What does the '<' symbol do in the following command:
ls > data.txt
Question 3 options:
compares the size of the ls and data.txt files |
|
redirect the output of the ls command to the file data.txt |
|
read the contents of the data.txt file and use it as input for the ls command |
|
redirects stderr to stdout |
Question 4 (1 point)
How do the standard C functions fread and fwrite differ from the system functions read and write?
Question 4 options:
The standard C functions are portable, whereas read and write are not |
|
The standard C functions are undocumented |
|
The standard C functions use a different permission system |
|
The standard C functions have an internal buffer |
Question 5 (1 point)
What standard C function performs formatted input from stdin?
Question 5 options:
getc |
|
readf |
|
scanf |
|
printf |
Question 1: stat system function returns the size of a file Answer: stat Question 2: chmod function permits you to change a file's permissions Answer: chmod Question 3: < means read the contents of the data.txt file and use it as input for the ls command > means redirect the output of the ls command to the file data.txt Question 4: The standard C functions have an internal buffer Question 5: standard C function performs formatted input from stdin is printf Answer: printf
Get Answers For Free
Most questions answered within 1 hours.