Question 39Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

Which of the following techniques can be used to modify the actual variable passed to a

Which of the following techniques can be used to modify the actual variable passed to a function?
  1. AUse a local variable instead of passing any parameters.
  2. BPass a copy of the actual parameter to function.
  3. CStandard C has no options for modifying actual variables passed to a function.
  4. DPass the address of the actual parameters to function.
Show answerHide answer

Correct answer: (D) Pass the address of the actual parameters to function.

Explanation

C passes arguments by value, so to change the caller's variable you pass its address (a pointer) and modify it through *ptr inside the function.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM)

This is question 39 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 1 (9:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.