17 How do I `lock' a file?
1 Use filelock()
2 use lockfile()
3 Use lockfd()
4 use fcntl()
18 How do I find the size of a file inside a program?
1 Use ls -l
2 Use sizeof()
3 Use filesize()
4 Use fstat()
19 How can I tell how much memory my system has?
1 Use getmemory()
2 Use sysctl()
3 Use freemem()
4 Use malloc()
21 What is a socket
1 A port to connect printer 2
A port to connect keyboard
3 An abstraction to pass data across processes
4 A hardware device
22 What is a semaphore
1 A mechanism to share non-sharable resources
2 A mechanism to access memory very fast
3 A mechanism to access kernel details
4 None
23 What is a message queue?
1 A printer queue
2 An IPC mechanism with destructive execute
3 An IPC mechanism with destructive write
4 An IPC mechanism with destructive read
24 Difference between shared memory & message queue 1
No differences
2 IPC mechanism vs Non-IPC mechanism
3 Non-destructive read vs destructive read
4 Destructive read vs non-destructive read
25 To delete the last word of each line in the file test1
1 sed 's/ */$//' test1
2 sed 's/ *$//' test1
3 sed 's/ *$//' test1
4 sed 's/ *$\/\/' test1
How many bytes will a S9(8) COMP field occupy ?
9
4
8
5
How many bytes does a S9(7) COMP-3 field occupy
3
7