Call Stack in C++: How Functions Run đź”§
Learn what happens behind the scenes when functions are called in C++. Varun sir explains the execution process step-by-step.

Gate Smashers
25.0K views • Jun 17, 2025

About this video
What really happens behind the scenes when you call a function in your code? In this video, Varun sir will break down how functions are executed step-by-step using the call stack — in the simplest way possible! Whether you're a beginner or just want to strengthen your programming basics, this video will help you understand how your code runs and how the stack handles each function call. #cplusplus #programming
--------------------------------------------------------------------------------------------------------------------------------------
Timestamps:
00:00 - Introduction
00:37 - Understanding Stack Memory
01:29 - Example of Stack Frame (LIFO-Based)
--------------------------------------------------------------------------------------------------------------------------------------
👉Subscribe to our new channel:https://www.youtube.com/@varunainashots
â–şC++ Complete playlist: https://www.youtube.com/playlist?list=PLxCzCOWd7aiF6yRNI5OHQsnUJQfl7Geqj
Subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
â–şDesign and Analysis of algorithms (DAA):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHcmS4i14bI0VrMbZTUvlTa
â–şSoftware Engineering (Complete Playlist):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiEed7SKZBnC6ypFDWYLRvB2
â–şDatabase Management System:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiFAN6I8CuViBuCdJgiOkT2Y
â–şCloud Computing:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHRHVUtR-O52MsrdUSrzuy4
â–ş Theory of Computation
https://www.youtube.com/playlist?list=PLxCzCOWd7aiFM9Lj5G9G_76adtyb4ef7i
â–şArtificial Intelligence:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHGhOHV-nwb0HR5US5GFKFI
â–şComputer Networks (Complete Playlist):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGFBD2-2joCpWOLUrDLvVV_
â–şOperating System:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGz9donHRrE9I3Mwn6XdP8p
â–şStructured Query Language (SQL):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHqU4HKL7-SITyuSIcD93id
â–şDiscrete Mathematics:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiH2wwES9vPWsEL6ipTaUSl3
â–şCompiler Design:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiEKtKSIHYusizkESC42diyc
â–şNumber System:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiFOet6KEEqDff1aXEGLdUzn
â–şProgramming in C :
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGmiGl_DOuRMJYG8tOVuapB
â–şData Structure:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiEwaANNt3OqJPVIxwp2ebiT
â–şComputer Architecture :
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHMonh3G6QNKq53C6oNXGrX
â–şGraph Theory (Complete Playlist):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiG0M5FqjyoqB20Edk0tyzVt
â–şDigital Logic:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGmXg4NoX6R31AsC5LeCPHe
---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
â–ş Subscribe to us on YouTube: https://www.youtube.com/gatesmashers
â–şSubscribe to our new channel: https://www.youtube.com/@varunainashots
â–ş Like our page on Facebook: https://www.facebook.com/gatesmashers
â–ş Follow us on Instagram: https://www.instagram.com/gate.smashers
â–ş Follow us on Instagram: https://www.instagram.com/varunainashots
â–ş Follow us on Telegram: https://t.me/gatesmashersofficial
â–ş Follow us on Threads: https://www.threads.net/@gate.smashers
--------------------------------------------------------------------------------------------------------------------------------------
â–şFor Any Query, Suggestion or notes contribution:
Email us at: gatesmashers2018@gmail.com
--------------------------------------------------------------------------------------------------------------------------------------
Timestamps:
00:00 - Introduction
00:37 - Understanding Stack Memory
01:29 - Example of Stack Frame (LIFO-Based)
--------------------------------------------------------------------------------------------------------------------------------------
👉Subscribe to our new channel:https://www.youtube.com/@varunainashots
â–şC++ Complete playlist: https://www.youtube.com/playlist?list=PLxCzCOWd7aiF6yRNI5OHQsnUJQfl7Geqj
Subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
â–şDesign and Analysis of algorithms (DAA):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHcmS4i14bI0VrMbZTUvlTa
â–şSoftware Engineering (Complete Playlist):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiEed7SKZBnC6ypFDWYLRvB2
â–şDatabase Management System:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiFAN6I8CuViBuCdJgiOkT2Y
â–şCloud Computing:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHRHVUtR-O52MsrdUSrzuy4
â–ş Theory of Computation
https://www.youtube.com/playlist?list=PLxCzCOWd7aiFM9Lj5G9G_76adtyb4ef7i
â–şArtificial Intelligence:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHGhOHV-nwb0HR5US5GFKFI
â–şComputer Networks (Complete Playlist):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGFBD2-2joCpWOLUrDLvVV_
â–şOperating System:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGz9donHRrE9I3Mwn6XdP8p
â–şStructured Query Language (SQL):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHqU4HKL7-SITyuSIcD93id
â–şDiscrete Mathematics:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiH2wwES9vPWsEL6ipTaUSl3
â–şCompiler Design:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiEKtKSIHYusizkESC42diyc
â–şNumber System:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiFOet6KEEqDff1aXEGLdUzn
â–şProgramming in C :
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGmiGl_DOuRMJYG8tOVuapB
â–şData Structure:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiEwaANNt3OqJPVIxwp2ebiT
â–şComputer Architecture :
https://www.youtube.com/playlist?list=PLxCzCOWd7aiHMonh3G6QNKq53C6oNXGrX
â–şGraph Theory (Complete Playlist):
https://www.youtube.com/playlist?list=PLxCzCOWd7aiG0M5FqjyoqB20Edk0tyzVt
â–şDigital Logic:
https://www.youtube.com/playlist?list=PLxCzCOWd7aiGmXg4NoX6R31AsC5LeCPHe
---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
â–ş Subscribe to us on YouTube: https://www.youtube.com/gatesmashers
â–şSubscribe to our new channel: https://www.youtube.com/@varunainashots
â–ş Like our page on Facebook: https://www.facebook.com/gatesmashers
â–ş Follow us on Instagram: https://www.instagram.com/gate.smashers
â–ş Follow us on Instagram: https://www.instagram.com/varunainashots
â–ş Follow us on Telegram: https://t.me/gatesmashersofficial
â–ş Follow us on Threads: https://www.threads.net/@gate.smashers
--------------------------------------------------------------------------------------------------------------------------------------
â–şFor Any Query, Suggestion or notes contribution:
Email us at: gatesmashers2018@gmail.com
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
25.0K
Likes
477
Duration
6:19
Published
Jun 17, 2025
User Reviews
4.6
(4) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.