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

C notes

Rating
-
Sold
-
Pages
7
Uploaded on
28-10-2024
Written in
2024/2025

High quality study material for BCA

Institution
Course

Content preview

First string: database second string: database

` Now first string is: database-one




Lecture Note: 14


FUNCTION

A function is a self contained block of codes or sub programs with a set of
statements that perform some specific task or coherent task when it is called.

It is something like to hiring a person to do some specific task like, every six
months servicing a bike and hand over to it.

Any ‘C’ program contain at least one function i.e main().

There are basically two types of function those are

1. Library function

2. User defined function

The user defined functions defined by the user according to its requirement

System defined function can’t be modified, it can only read and can be used.
These function are supplied with every C compiler

Source of these library function are pre complied and only object code get used by
the user by linking to the code by linker

Here in system defined function description:

Function definition : predefined, precompiled, stored in the library


63 *Under revision

, Function declaration : In header file with or function prototype.

Function call : By the programmer

User defined function

Syntax:-

Return type name of function (type 1 arg 1, type2 arg2, type3 arg3)

Return type function name argument list of the above syntax

So when user gets his own function three thing he has to know, these are.

Function declaration

Function definition

Function call

These three things are represented like

int function(int, int, int); /*function declaration*/

main() /* calling function*/

{

function(arg1,arg2,arg3);

}

int function(type 1 arg 1,type2 arg2,type3, arg3) /*function definition/*

{

Local variable declaration;

Statement;

Return value;

}



64 *Under revision

Written for

Course

Document information

Uploaded on
October 28, 2024
Number of pages
7
Written in
2024/2025
Type
Class notes
Professor(s)
Akanksha
Contains
All classes

Subjects

$3.49
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
akankshasaini1

Get to know the seller

Seller avatar
akankshasaini1 SSDPC college
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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