Monday, September 28, 2026

(BCA Semester 1 C Language Unit : 3 ) Working with Functions

 

Unit 3: Working with Functions

Welcome to Unit 3 of C Language – Semester 1, where we explore the powerful concept of Functions in C Programming.

Functions are one of the most important concepts in C because they allow a large program to be divided into small, manageable, reusable, and logically organized blocks of code. In this unit, students will learn both Library Functions provided by C and User-Defined Functions created by programmers.

The unit begins with an introduction to Library Functions and Header Files. Students will learn how predefined functions can be used to perform common tasks such as string manipulation, mathematical calculations, input/output operations, character checking, and memory management.

You will explore important String Library Functions such as strcpy(), strncpy(), strcat(), strncat(), strcmp(), strncmp(), strlen(), strchr(), and strstr().

The unit also covers Mathematical Library Functions, including ceil(), exp(), abs(), fabs(), floor(), fmod(), log(), pow(), sqrt(), and rand(). You will also learn commonly used Input/Output Formatting Functions such as printf(), scanf(), getc(), getchar(), gets(), putc(), putchar(), and puts().

The unit further introduces Miscellaneous Library Functions, Memory Allocation Functions, and their practical applications. Students will learn dynamic memory management using malloc(), calloc(), realloc(), and free().

The final and most important part of this unit focuses on User-Defined Functions. Students will learn how to create and call their own functions, understand different types of functions, and distinguish between Call by Value and Call by Reference. The unit also introduces Recursive Functions and Storage Classes.

📚 In This Unit, You Will Learn:

🔹 Library Functions and Header Files

  • 🔹 Introduction to Library Functions

  • 🔹 Overview of Header Files

  • 🔹 Types of Library Functions

  • 🔹 Using Predefined Functions in C

🔹 String Library Functions

  • 🔹 strcpy()

  • 🔹 strncpy()

  • 🔹 strcat()

  • 🔹 strncat()

  • 🔹 strchr()

  • 🔹 strcmp()

  • 🔹 strncmp()

  • 🔹 strlen()

  • 🔹 strstr()

🔹 Mathematical Library Functions

  • 🔹 ceil()

  • 🔹 div()

  • 🔹 exp()

  • 🔹 abs()

  • 🔹 fabs()

  • 🔹 floor()

  • 🔹 fmod()

  • 🔹 log()

  • 🔹 pow()

  • 🔹 sqrt()

  • 🔹 rand()

🔹 Input/Output Formatting Functions

  • 🔹 printf()

  • 🔹 scanf()

  • 🔹 getc()

  • 🔹 getchar()

  • 🔹 gets()

  • 🔹 putc()

  • 🔹 putchar()

  • 🔹 puts()

🔹 Miscellaneous Library Functions

  • 🔹 delay()

  • 🔹 clrscr()

  • 🔹 isalnum()

  • 🔹 isalpha()

  • 🔹 isdigit()

  • 🔹 islower()

  • 🔹 isprint()

  • 🔹 isspace()

  • 🔹 isupper()

  • 🔹 toupper()

  • 🔹 tolower()

  • 🔹 exit()

🔹 Dynamic Memory Allocation

  • 🔹 Introduction to Dynamic Memory Allocation

  • 🔹 malloc()

  • 🔹 calloc()

  • 🔹 realloc()

  • 🔹 free()

  • 🔹 Managing Memory Dynamically in C

🔹 User-Defined Functions

  • 🔹 Introduction to User-Defined Functions

  • 🔹 Need and Advantages of Functions

  • 🔹 Types of User-Defined Functions

  • 🔹 Function Declaration and Definition

  • 🔹 Function Calling

  • 🔹 Call by Value

  • 🔹 Call by Reference

  • 🔹 Difference between Call by Value and Call by Reference

  • 🔹 Recursive Functions

  • 🔹 Introduction to Recursion

  • 🔹 Storage Classes

Throughout this unit, students will learn how functions make C programs modular, reusable, organized, and easier to maintain. Practical examples will help students understand how both predefined and user-defined functions can simplify programming tasks.

By the end of this unit, students will be able to use important C library functions, work with header files, perform string and mathematical operations, handle input/output functions, manage dynamic memory, create user-defined functions, understand call by value and call by reference, implement recursive functions, and explain storage classes.

This unit provides an important foundation for advanced C programming concepts such as Arrays, Pointers, Structures, Unions, File Handling, Dynamic Data Structures, and Modular Programming.

🎓 This Study Material is Useful for:

🎓 BCA Semester 1 Students
🎓 MCA Beginners
🎓 B.Sc. IT / Computer Science Students
🎓 C Programming Beginners
🎓 Programming Logic Beginners
🎓 Computer Science Beginners
🎓 Students Preparing for University Examinations
🎓 Competitive Exam Preparation






















⭐ About Ruparel Education

Ruparel Education Pvt. Ltd., Junagadh has been providing quality education and professional computer training for more than 27 years. Our mission is to help students build strong technical skills through practical learning, industry-oriented courses, and expert guidance.


Prepared & Compiled By

Mr. Uday Shah

Head of Information Technology (HOD–IT)
Ruparel Education Pvt. Ltd., Junagadh

Assistant Professor
Faculty of Computer Applications
Noble University

🌐 Blog: https://uday-shah.blogspot.com

© 2026 All Rights Reserved.