Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Functions in C programming

Rating
-
Sold
-
Pages
25
Uploaded on
14-11-2024
Written in
2024/2025

Detailed and understandable notes

Institution
Course

Content preview

UNIT-5 FUNCTIONS




1

,What is Function?
▪ A function is a group of statements that perform a specific task.
▪ It divides a large program into smaller parts.
▪ Function is a group of statements as a single unit known by some
name which is performing some well defined task.
▪ Every C program can be thought of as a collection of these
functions.
▪ Program execution in C language starts from the main function.

void main()
{
// body part
▪ Why function ? }
• Avoids rewriting the same code over and over.
• Using functions it becomes easier to write programs and keep track of what
they doing

, Advantages of Functions
▪ It facilitates top-down modular programming, whereby the large
problem is divided into small parts.
▪ It reduces the size of code, if that code is repetitively used in
program.
▪ Function can be used in other program also, so labor is reduced.
▪ Function can call itself, which is called as recursion, it reduces the
coding, some problems are recursive in nature.
▪ It allows team-work for large project, individual members of team
has to concentrate on the function given to them and not on the
whole complex problem.

Written for

Institution
Course

Document information

Uploaded on
November 14, 2024
Number of pages
25
Written in
2024/2025
Type
Class notes
Professor(s)
Brijesh panchal
Contains
All classes

Subjects

$3.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
shreelgandhi

Also available in package deal

Get to know the seller

Seller avatar
shreelgandhi Sardar Vallabbhai Patel Institute of Technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
16
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions