Our team has conducted extensive research to compile a set of System Programming MCQs. We encourage you to test your System Programming knowledge by answering these multiple-choice questions provided below.
Simply scroll down to begin!
A. In the scanning for an internals function
B. Anywhere at all
C. In the iteration of the fscanf() function
D. In the beginning of the main() function
A. Initializes a subset of memory pointed to by &ctl_addr
B. Given that 0 is passed, it unsets the memory of ctl_addr
C. Initializes the region of memory pointed to by &ctl_addr
D. Allocates and initializes memory for variable ctl_addr
A. Timing Diagram
B. Sequence Diagram
C. Event Trace
D. E-R Schema
A. send()
B. sendto()
C. sendmsg()
A. SSH
B. RSH
C. EncryptoTelnet
D. rlogin
A. A client's server
B. A client's socket
C. A server's clients
D. A server's socket
A. Proper program function requires all threads to run quickly
B. Proper program function requires that all threads run at the same speed
C. Proper program function is dependent on the execution sequence and timing of each thread
A. fflush()
B. fscanf()
C. fbuffer()
D. sscanf()
A. No, it is a 'well-defined' or reserved port.
B. Yes, it is as good as any other port number.
C. Yes, it is best ot use low numbers for port numbers.
D. No, it is best to use three or four digit port numbers.
A. Man-in-the-middle
B. Buffer overflow
C. Password cracking
D. Denial of service
A. Child process terminates before its parent process
B. Parent process terminates before its child process
C. Parent and child process terminate simultaneously
A. PHP
B. ALGOL
C. LISP
D. None of these
A. #itdef, #ifndef, and #endif
B. Bit flags and bitwise OR'ing
C. Use host-specific linkers
D. if, else if, and else blocks
A. Threads and processes exist separately
B. Each thread exists within a process
C. Each process exists within a thread
A. The function is written using block structuring
B. The function must terminate before control returns to caller
C. This function's purpose is to block unstructured calls
D. This function has the highest possible priority
A. Hard links can cross filesystems
B. Files are deleted from disk when a hard link is removed
C. Hard links are directory entries that point to the same inode as another file
A. Syntax error; the second argument should be a single integer type
B. Syntax error; the function takes only one more argument after 'filename'
C. Runtime error opening the file as the various flags and modes are in conflict
D. Opens a file descriptor, bitwise OR'ing output flags and in mode 644
A. Frequently check email and other network services
B. Sample system process information for use by the top command
C. Watch a set of file descriptors to see which are ready
A. a file descriptor
B. a file struct
C. a file function
D. a file pointer
A. Yes, because recursion is always preferable to iteration
B. No, because iteration is always preferable to recursion
C. No, because both stack depth and stack-frame size are unpredictable
D. No, because there is more than one 'long integer' type
A. Multiple threads can be executed without corrupting shared data
B. Threads don’t start until all of the resources they require are available
C. Threads can only access the data in its process
A. st_ctime
B. st_mtime
C. st_atime
A. Aggressive caching of a process
B. Prevent users from renaming or deleting files created by other users
C. Keep a process from swapping out of memory
A. STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2
B. STDOUT_FILENO = 0, STDERR_FILENO = 1, STDERR_FILENO = 2
C. STDERR_FILENO = 0, STDOUT_FILENO = 1, STDIN_FILENO = 2
D. STDIN_FILENO = 0, STDERR_FILENO = 1, STDOUT_FILENO = 2
A. The child inherits the parent’s
B. The child always has an empty set of closed descriptors
C. The child has distinct copies of the parent’s
D. The child overwrites the parent’s
A. C rand() function
B. /dev/random
A. Standard file access functions
B. Pipes
C. It depends on the device
A. #include errno.h header file
B. Properly pass parameter for Book
C. Pass both parameters by reference
D. Implement an exception handler
A. semaphore
B. named pipe
C. shared memory
D. unnamed pipe
A. line 21: if (my_sock < 0) {
B. line 20: my_sock = (int *)socket(anaddr.sin_family, SOCK_STREAM, 0);
C. line 20: my_sock = socket(SOCK_STREAM, anaddr.sin_family, 0);
D. line 10: SOCKET * my_sock;
A. Mapped memory is cached
B. Mapped memory uses prefetching
C. Mapped memory uses lazy loading
A. Removes the file from its directory
B. Sets the file’s inode count to one (1)
C. Moves the file in from one directory to another
A. Disk Drives
B. Special character devices
C. Virtual TTY lines
A. Big endian versus littlen endian
B. Text file versus binary file
C. Ignoring the parity bit
D. Not using buffered streaming
A. bind(s, &sock_struct, l);
B. bind(s, l, sock_struct);
C. bind(s, sizeof(sock_struct), l);
D. bind(sock_struct, s, l);
A. 0
B. -1
C. 2054
D. 19456
A. Listen on a port below 1024
B. Create a file in the /tmp directory
C. Open a file in the owner’s directory
D. exec() a new process
A. The present object's ultimate superclass or base class below the root object
B. The present object's superclass or base class
C. The present object's class
D. The root object
A. The thread that calls join blocks until all of the joinable threads complete
B. The system manages the shared resources for the joined threads
C. The joined threads are added to a queue and executed serially
A. wait4()
B. free()
C. close()
D. flush()
A. thread
B. daemon
C. orphan
D. zombie
A. The code will sometimes run and sometimes cause a crash
B. The code will always cause a crash
C. It isn't possible to tell without looking at my_print_func()
D. One thread will run while others will crash or abort
A. Pipes can be shared by more processes
B. Pipes connect processes on multiple machines
C. No additional work required on multiple CPU systems without cache coherence
D. Faster access time
A. sprintf()
B. strftime()
C. localtime()
D. get_datetime()
A. Defining bitwise flags
B. User-defined typing
C. Flags for file access
D. Alpha-numeric interchange
A. Man-in-the-middle
B. Password cracking
C. Denial of service
D. Buffer Overflow
A. sched_yield()
B. pthread_detach()
C. pthread_cancel()
D. pthread_setschedparam()
A. A list of files
B. A special type of inode
C. A file that contains other files
A. Call sigsetmask() to set the signal mask to be blocked
B. Create a mutex within the handler to protect shared resources
C. Call sigaction() to block the signal and set the signal mask at the same time
A. One is a true system call; the other is a library routine
B. One does some work on its own, then calls the other
C. One is for the main process; the other for forked processes
D. One flushes and closes I/O streams; the other doesn't