What is the term for a function defined within another function?

Computer Science MCQs for PPSC, FPSC, NTS, and Pakistan government job tests. Select an option below, then read the explanation.

PPSCFPSCNTSPakistan govt jobs
Subject
Computer Sciencecomputer-science
Published
6 Jul 2021
Last updated
28 May 2026

Browse all Computer Science MCQs

Choose the correct answer

Explanation

A function that is declared inside another function is known as a nested function. This structure allows the inner function to be encapsulated within the outer function.

PakQuizHub — free MCQs and past papers for Pakistan government job tests. Content is for educational practice only.