Premium Essay

Nt1330 Unit 3 Quiz Essay

Submitted By
Words 1393
Pages 6
1. When to use standard I/O
(A) When working with disk or terminal files
(B) When you need to fetch file metadata [a]
(C) None
(D) All the above
2. Difference between getc and fgetc
(a) fgetc can be implemented as macro, where as getc cannot be implemented as macro
(b) getc can be implemented as macro, where as fgetc cannot be implemented as a macro [b]
(c) getc is used to write a character and fgetc to read a character
(d) fgetc to write a character and getc to read a character 3. rewinddir returns (a) 0
(b) -1 [c]
(c) no value
(d) error
(4) The functions which change the execution mode of the program from user mode to kernel mode are known as
(a) …show more content…
What is the octal representation for files, which has read and write permissions for the owner?
a. 2
b. 8
c. 6
d. 0

14. Which command is used to create a empty directory?
a. chdir
b. mkdir
c. rmdir
d. cr

15. Which command is used to change the access permissions for an existing file?
a. chmod
b. chgrp
c. link
d. chown

16. ctime command is used to perform _____
a. convert time
b. convert date
c. convert date and time
d. none of these

17. What is the return value when printf() fails?
a. a negative value.
b. a positive value.
c. zero
d. string

18. The command used to remove the directory is _______
a. mkdir
b. rd
c. remove
d. rmdir

19. Which command is used to remove files?
a. rmdir
b. rm
c. delete
d. both a and b
20. When we calculate the value of the number using the command abs. The return value is ____?
a. approximate value of integer
b. string of integers
c. absolute value of integer
d. all of the above

21. What does a global variable “errno” indicates?
a. null
b. error
c. error free
d. no error

22. _______ function copies an absolute pathname of the current working directory to the array pointed to buf.
a. strcat
b. abs
c. mrdir
d. getcwd

23. #include<string.h> char *strcat(char *dest, const char

Similar Documents