Functions - General Questions :: Discussion


3.How many times the program will print "Pak-MCQs"?
A.Infinite times
B.32767 times
C.65535 times
D.Till stack overflows
Answer:  Option  D
Explanation:

call stack or function stack is used for several related purposes, but the main reason for having one is to keep track of the point to which each active subroutine should return control when it finishes executing.

stack overflow occurs when too much memory is used on the call stack.

Here function main() is called repeatedly and its return address is stored in the stack. After stack memory is full. It shows stack overflow error.

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers