
Linux C Programming test
Created on 21st March 2024
2 plays
14 Questions
No Description
Questions (14)
1. What is the type of the third argument of the calloc libc function?
null
4 choice options
2. What does the return value of execv represents?
An error
4 choice options
3. What is the syscall select used for?
I/O multiplexing
4 choice options
4. What mechanisms can be used to instrument the linux kernel?
Kprobes
4 choice options
5. What is possible to do with eBPF?
All of the above
4 choice options
6. What is not possible to hook with eBPF?
User-space applications
4 choice options
7. What is the purpose of the open syscall?
Create a new file
4 choice options
8. Which system call is used to terminate a process?
exit
4 choice options
9. What is the purpose of the read function in C?
Read data from a file
4 choice options
10. What does the fork system call do?
Create a new process
4 choice options
11. In RISC architectures, what is a delay slot?
The execution of an instruction without the effects of a preceding one. For example - JMP x; INC y. (the INC will be performed)
3 choice options
12. How do you switch between MIPS 32 bit and MIPS 16 bit execution modes?
By performing a branch to an odd address (addresses that end with 1)
3 choice options
13. I want to create a /dev/arbelrandom device which returns random data. Exactly the same as /dev/random. What syscall should I use to do that?
mknod
4 choice options
14. In MIPS, what is the difference between a Branch and a Jump instructions?
Branches can be conditional, and jumps are only absolute
3 choice options