MCS-011 Problem Solving and Programming

First year, Semester 1

Chapters

Newsletter

To simplify and debug programming, large programs are divided into smaller subprograms called functions, each performing well-defined tasks. Initially, only the main() function was defined, but this unit will teach you to define and call multiple functions from main() to perform required processing. Functions are crucial for Modular Programming (a programming approach that breaks large programs into smaller, manageable subprograms or modules), reducing complexity and making programs easier to understand. This unit covers defining and accessing functions, different types of functions, invoking them, and the concept of Recursion, where a function calls itself.


Objective:

After going through this unit, you will learn:

  • the need of functions in the programming;
  • how to define and declare functions in ‘C’ Language;
  • different types of functions and their purpose;
  • how the functions are called from other functions;
  • how data is transferred through parameter passing, to functions and the Return statement;
  • recursive functions; and
  • the concept of ‘Call by Value’ and its drawbacks. 

Report an issue

Reporting: Unit-8 Functions (chapter)

Related Posts