1. Home
  2. Computer Science MCQs
  3. C#
  4. In C#, what is required of a parameter declared with the…

Added 2 Nov 2026

In C#, what is required of a parameter declared with the out keyword?

  1. It is read-only inside the called method
  2. It must be initialised by the caller before the call
  3. It can only be used with value types, not classes
  4. It must be assigned inside the method before returning Correct answer

Correct answer

D. It must be assigned inside the method before returning

16 views

MCQSEXAM

Explanation

An out parameter must be assigned by the method, but the caller does not need to initialise it. A ref parameter must be initialised by the caller, and an in parameter is read-only.

Reference

Asked in: NTS, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C# MCQs

Practise all C# MCQs

Similar MCQs