December 22, 2024

Systems Programming MCQ Questions & Answers

System Programming
Share :

Systems Programming MCQ Questions & Answers


Quiz – 3

  1. 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.


  2. In assembler, which data structure are used to make an entry of operands address
    Ans. SYMTAB
  3. 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.


  4. An assembler is
    Ans. Machine dependent
  5. system software resides in main memory always.
    Ans. Loader
  6. A linker program
    Ans. links the program with other programs needed for its execution.
  7. 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


  8. I real time application which type of loader is used
    Ans. Boostrap loader
  9. When reading and writing a file, which of the following modes is used?
    Ans.O_RDWR
  10. 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

  1. Fork system call returns __________ time/times.
    Ans. Twice
  2. write system call returns -1 when __________
    Ans. if disk fills up while write is in progress and if the file size exceeds
  3. 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


  4. Vi editor Command to change a lowercase letter to uppercase or an uppercase letter to lowercase
    Ans. ~
  5. Which one of the mode is the right one for kernel to run on behalf of the user?
    Ans. kernel
  6. Command to rename a file a.txt to b.txt in Linux is
    Ans. mv a.txt b.txt


  7. mknod can create special file (used for sending or receiving data) of type:
    Ans. all are correct
  8. The command used to give all permissions to users and read permission to others and group is
    Ans. Chmod 744 file
  9. 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.
  10. 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

  11. 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
  12. ‘mik’s’ is used to:
    Ans. create a filesystem on a device (such as a hard disk partition)
  13. Information about modules, like module dependency, and where certain types of modules reside in the filesystem, is found in:
    Ans. /etc/modinfo.conf


  14. The keyword expr is used to handle
    Ans. Both strings and arithmetic operations
  15. 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
  16. Which of the following is not a system call __________
    Ans. getc


  17. System call are the services provided by ____________
    Ans. Linux kernel
  18. logical execution of program will be done using __________ operators
    Ans. && and ||
  19. The directory that contains programs for use by the system administrator is
    Ans. /sbin
  20. Find / -name ‘*’
    Ans. Will List all files and directories recursively starting from /



For More Updates Join Our Channels :