Quiz Space

Operating Systems · End Term · 1 Sept 2024 · May 2024 term

Question 3: Consider the following program snippet: When largeBuffer[…

Question 3

+2 marksOne correct option

Consider the following program snippet:

c
1 void exampleFunction(int x, int y)
2 {
3 char smallBuffer[4];
4 char largeBuffer[8];
5 }
6 void main
7 {
8 exampleFunction(1, 2);
9 }

When largeBuffer[8] = smallBuffer[0] occurs, the situation is known as ___.

  1. A

    Heap overflow

  2. B

    Buffer overflow

  3. C

    Frame overflow

  4. D

    Stack overflow

Show answer

Correct answer

  • B

    Buffer overflow

Question 3 of 20 in the IIT Madras BS Operating Systems (Operating Systems) End Term paper sat on 1 Sept 2024, in the May 2024 term (IIT M DEGREE FN EXAM QDB1 01 Sep 2024). It carries 2 marks.

More questions from this paper

  1. Q1Consider the code segment (for xv6) given below. What are the base address and the end address of the RX register?
  2. Q2If the memory map of the DMA controller starts from the offset 0x30001000 and has an address range of 256 bytes in a 32…
  3. Q4In a cryptographic implementation where memory access patterns depend on the value of a secret key, which type of attac…
  4. Q5Figure question
  5. Q6When a process invokes the exec system call, the Process Identifier (PID) remains unchanged.
  6. Q7State True/false Bob can execute the Program 1.
  7. Q8Consider a system with 128 MB of physical memory and a 32-bit virtual address space. Given a page size of 8 KB, what wi…
  8. Q9In the Xv6 OS, What is the correct sequence of tasks as listed below that takes place as part of timer interrupt?\ (i) …
  9. Q10Consider a system with three processes (P1, P2, and P3) and three resources (R1, R2 and R3). The following Resource All…
  10. Q11Consider that the below commands are executed in a shell with root ("/") as the current directory. What is the absolute…
  11. Q12Consider the following functions that are used in the implementation of the Bakery algorithm: The function lock is call…
  12. Q13Consider the below plots representing the order in which the requests are serviced by different disk scheduling algorit…
  13. Q14Select all the true statements about hard links.
  14. Q15Assume Process A is currently running, Process B and Process D are waiting for an I/O operation, and Process C was runn…
  15. Q16Consider the set of 5 processes whose arrival time and burst time are given below. If the CPU scheduling policy used is…
  16. Q17Consider a system with four processes, P1, P2, P3, and P4, arriving at different times and needing the following CPU bu…
  17. Q18Consider a system with four processes, P1, P2, P3, and P4, arriving at different times and needing the following CPU bu…
  18. Q19Figure question
  19. Q20For a scenario with 7 philosophers in the dining philosopher’s problem, what is the minimum number of forks necessary t…