CS FundamentalsHardGATE CS · Infosys

Match each scenario with its coupling type. P: a module passes a flag telling the callee which of several operations to perform. Q: a whole Employee record is passed although only the employee id is used. R: two modules read and write the same global variable. S: one module directly changes another module's private data.

  1. A. P-stamp, Q-control, R-common, S-content
  2. B. P-control, Q-stamp, R-content, S-common
  3. C. P-control, Q-data, R-common, S-content
  4. D. P-control, Q-stamp, R-common, S-content

Correct answer: D. P-control, Q-stamp, R-common, S-content

A flag that steers the callee's logic is control coupling; passing a whole structure when part is used is stamp coupling; shared globals are common coupling; reaching into another module's internals is content coupling, the worst kind.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic