Systems Programming MCQ Questions & Answers
Quiz – 3
- Which one of the following is a valid statement related to linker?
Select one:
a. Loader is an application program that takes basic computer instructions and converts them into bits that the computer’s processor can use to perform its basic operations
b. Linker is a computer program that directly links instructions written in a programming or scripting language and executes them in real time.
c. The linker loads the program into the main memory for execution of that program.
d. Linker is special program that combines the object files usually generated by either compiler or assembler and other libraries to originate an executable file.
Ans. Linker is special program that combines the object files usually generated by either compiler or assembler and other libraries to originate an executable file.
- In assembler, which data structure are used to make an entry of operands address
Ans. SYMTAB - Identify the correct statement.
Select one:
a. All Signals can either be caught by the User Handler function or can be Ignored.
b. SIGSTOP and SIGKILL signal can’t be ignored but can be caught by the user handler function.
c. SIGINT signal can’t be either ignored or caught by the user handler function and will always perform the default action.
d. SIGSTOP and SIGKILL signal can’t be either ignored or caught by the user handler function and will always perform the default action.
Ans. SIGSTOP and SIGKILL signal can’t be either ignored or caught by the user handler function and will always perform the default action.
- An assembler is
Ans. Machine dependent - system software resides in main memory always.
Ans. Loader - A linker program
Ans. links the program with other programs needed for its execution. - Which of the following is true about following command
Is /bin/usr/bin | sort | uniq | tee /dev/tty >/dev/null
Ans. Command will be successful but nothing will be displayed
- I real time application which type of loader is used
Ans. Boostrap loader - When reading and writing a file, which of the following modes is used?
Ans.O_RDWR - Combines two or more separate object programs and supplies the information needed to allow references between them.
Ans. Linker
For More Updates Join Our Channels :
Quiz – 2
- Fork system call returns __________ time/times.
Ans. Twice - write system call returns -1 when __________
Ans. if disk fills up while write is in progress and if the file size exceeds - What is the output of following script?
#!/bin/bash
n=10
m=5
echo “The value of n = $n”
echo ‘The value of m = $m’
Ans. n=10, m=$m
- Vi editor Command to change a lowercase letter to uppercase or an uppercase letter to lowercase
Ans. ~ - Which one of the mode is the right one for kernel to run on behalf of the user?
Ans. kernel - Command to rename a file a.txt to b.txt in Linux is
Ans. mv a.txt b.txt
- mknod can create special file (used for sending or receiving data) of type:
Ans. all are correct - The command used to give all permissions to users and read permission to others and group is
Ans. Chmod 744 file - What does $? returns when using shell scripting?
Ans. $? will retum exit status of command, 0 if command gets successfully executed, non-zero if command failed. - Which of the following shell scripts will produce the output “my first script”?
Ans. for i in my first script, de echo -i $i; done
- Assuming the command line arguments to be first second third, what would be the output of the following script:
while [$# -gt 0 ]
do last=”$@”
shift
done
echo $last
Ans. third - ‘mik’s’ is used to:
Ans. create a filesystem on a device (such as a hard disk partition) - Information about modules, like module dependency, and where certain types of modules reside in the filesystem, is found in:
Ans. /etc/modinfo.conf
- The keyword expr is used to handle
Ans. Both strings and arithmetic operations - What will be the output of the following programs?#!/bin/bash
x=1; y=1;
if [ $x -eq $y]
then
echo $?
else
echo “Invalid”
fi
Ans. 0 - Which of the following is not a system call __________
Ans. getc
- System call are the services provided by ____________
Ans. Linux kernel - logical execution of program will be done using __________ operators
Ans. && and || - The directory that contains programs for use by the system administrator is
Ans. /sbin - Find / -name ‘*’
Ans. Will List all files and directories recursively starting from /
For More Updates Join Our Channels :