Quiz Space

Operating Systems · Quiz 2 · 12 Apr 2026 · January 2026 term

Question 3: Choose all the correct statements regarding compiling and…

Question 3

+3 marksOne or more correct options

Choose all the correct statements regarding compiling and linking multiple C source files using gcc

Select all that apply.

  1. A

    The command gcc file1.c file2.c -o output produces an executable named output.

  2. B

    The command gcc -c file1.c file2.c -o output produces an executable named output.

  3. C

    The command gcc -c file1.c file2.c produces file1.o and file2.o.

  4. D

    The command gcc file1.o file2.o -c -o output produces an executable named output.

  5. E

    The command gcc file1.o file2.o -o output links the object files into an executable named output.

Show answer

Correct answers

  • A

    The command gcc file1.c file2.c -o output produces an executable named output.

  • C

    The command gcc -c file1.c file2.c produces file1.o and file2.o.

  • E

    The command gcc file1.o file2.o -o output links the object files into an executable named output.

Question 3 of 17 in the IIT Madras BS Operating Systems (Operating Systems) Quiz 2 paper sat on 12 Apr 2026, in the January 2026 term (OS 06 Apr 26). It carries 3 marks.

This question was also asked in

More questions from this paper

  1. Q1Which of the following statements are correct?
  2. Q2Select all the correct statements.
  3. Q4Two processes P1 and P2 are competing for two shared R1 and R2.\ P1 holds R1 and waits for R2. • P2 holds R2 and waits …
  4. Q5Given the hexadecimal representation of the first few bytes of different files, identify the executable file (ELF file)…
  5. Q6Figure question
  6. Q7State True or False: In inter-process communication (IPC) using shared memory, the commonly used system calls are send …
  7. Q8If the exec system call is invoked as exec("/analyze", "data.txt", "config.json", "log.txt", "result.out");, then what …
  8. Q9In the following code snippet, a child process is created to execute the ls -l /home command. Identify the correct syst…
  9. Q10Match the following
  10. Q11What is a major disadvantage of the First Come First Serve (FCFS) scheduling algorithm in operating systems?
  11. Q12Which of the following statements correctly describes a key difference between the First-Come-First-Serve (FCFS) and Ro…
  12. Q13Assume that context switches can occur at any time during the execution of the following code snippet. The variable cou…
  13. Q14Consider the following code snippet from Bakery Algorithm. Considering that there are 5 processes, and initially num[0]…
  14. Q15Consider a set of 5 processes with the following arrival and burst times. If the CPU scheduling policy used is Round Ro…
  15. Q16Consider a system with four processes, P1, P2, P3, and P4, arriving at different times and requiring the following CPU …
  16. Q17Consider a system with four processes, P1, P2, P3, and P4, arriving at different times and requiring the following CPU …