CBSE Class 11 Computer Science Functions Notes Set B

Download CBSE Class 11 Computer Science Functions Notes Set B in PDF format. All Revision notes for Class 11 Computer Science have been designed as per the latest syllabus and updated chapters given in your textbook for Computer Science in Class 11. Our teachers have designed these concept notes for the benefit of Class 11 students. You should use these chapter wise notes for revision on daily basis. These study notes can also be used for learning each chapter and its important and difficult topics or revision just before your exams to help you get better scores in upcoming examinations, You can also use Printable notes for Class 11 Computer Science for faster revision of difficult topics and get higher rank. After reading these notes also refer to MCQ questions for Class 11 Computer Science given on studiestoday

Revision Notes for Class 11 Computer Science Functions

Class 11 Computer Science students should refer to the following concepts and notes for Functions in Class 11. These exam notes for Class 11 Computer Science will be very useful for upcoming class tests and examinations and help you to score good marks

Functions Notes Class 11 Computer Science

 

 Function: A function is a named unit of a group of statements that can be invoked from other parts of the program. The advantages of using functions are:

• Functions enable us to break a program down into a number of smaller and smaller and simpler units. This makes the program more organized and structured and easier to debug.

• It helps in reusability of code and thus reduces program size. If similar code is required at several places in the program, the use of a function allows this code to be written just once, and to be called wherever it is required.

• It helps to execute the same set of statements with different set of values. 

Function Declaration/Prototype: Just as any variable is declare before it is used in a program, it is necessary to declare a function to inform the compiler that the function would be referenced at a later point in the program. Function declaration is also called function prototype.

Syntax for function declaration:

<return type> <function name> ( <data type of parameter> [<parameter name>], …. );

Example: int sum ( int, int);

A declaration (prototype) tells the compiler that later on in our program we are going to write a particular function. It also informs the compiler about:

1. the type of result to be returned;

2. the identifier of the function;

3. the number and types of parameters;

It is terminated by a semicolon.

<return type>: It is the data type of the value that is returned to the calling function after the function is executed. It can be any of the data types, available in C++.

<function name>: It is the name of the function, which is given with accordance to the naming conventions used for naming an identifier. A function is called with the help of it’s name.

<data type of parameter>: These are the data types of the parameters/inputs that the function receives when it is called. In function declaration it is optional to give the name of the parameters. The different data types specify to the compiler, the total number of parameters, and the data type of these parameters that the function will receive, when it is called (invoked).

Function definition: The function definition contains the function header and the function body i.e. the set of statements which are executed when the function is called.

Syntax for function definition:

<return type> <function name> (<data type of parameter> <name of <parameter>, …. )

{

Statement 1;

Statement 2;

:

return ( value / variable / expression );

}

Example:

int sum ( int a, int b)

{

int s = a + b;

return s;

}

Note: The return statement is used to return a value to the calling function. It is always the last statement in the function definition (if the function has return type). The data type of the value returned should match with the return type of the function.

// Example 1

// Program to find the factorial of a number using a function Fact ()

#include<iostream.h>

#include<conio.h>

long Fact( long); // Function Prototype

void main()

{

long num;

clrscr();

cout<<”\n\tEnter a No. : “;

cin>>num;

cout<<num<<”! = ”<<Fact(num); // Function call with num as an actual parameter

getch();

}

// Definition of function

long Fact (long N) // Function header with as a Formal parameter

{

long I, f=1;

Function Body

for( i=1; i<=N; i++)

f = f * i;

return f;

}

class_12_computer_concept_5

Order of Execution in the above program

main() // Execution starts from the main()

Function call to Fact() // Control is passed to the function definition of Fact()

Execution of the Fact() // All the statements in the function Definition of Fact() are executed

Execution of statement getch() // Control returns to the main(), to the statement which follows the function call statement of Fact()

Function Header: It is the first line of the function definition, which specifies the following:

• Return type of the function

• Name of the function

• Name of the parameters, along with their data types 

Note: It is not terminated with semicolon.

Function Body: It is the set of statements, which are executed when the function is called.
 
Function Call: It is the statement in the calling function, through which the control is passed to the function definition of another function. This will execute the statements is the called function and then the control is returned back to the statement in the calling function, which follows the function call statement. The function call consists of the function name, followed by actual parameters, if any, enclosed in parentheses.
 
Calling Function: The function, which calls a function is called the calling function. In the above example main() is the calling function.
 
Called Function: The function which is called by anther function is known as the called function.
 
Formal Parameter: The parameters mentioned in the function header are called formal parameter.
 
Actual Parameter: Values/Variables which are used while making a call to the function are called actual parameter.
 
Difference between call by value and call by reference

 CBSE Class XI Computer Science Functions (1) 1

// Program to illustrate the invoking of a function using call by value
// and call by reference methods
#include<iostream.h>
#include<conio.h>
// Function to swap the values of two variables,
// where both the parameters are value parameters
void swapv ( int a, int b)
{
int temp = a;
a = b;
b = temp;
cout<<” Displaying the formal parameters of swapv () function “<<endl;
cout<<a<<”\t”<<b<<endl;
}
// Function to swap the values of two variables,
// where both the parameters are variable parameters
void swapr( int&b, int&b)
{
int temp = a;
a = b;
b = temp;
cout<<” Displaying the formal parameters of swapr () function “<<endl;
cout<<a<<”\t”<<b<<endl;
}
void main()
{
clrscr();
int x=5, y=7;
swapv(x,y);
cout<<”The values of actual parameters after calling the swapv() function”<<endl;
cout<<x<<”\t”<<y<<endl;
swapr(x,y);
cout<<”The values of actual parameters after calling the swapr() function”<<endl;
cout<<x<<”\t”<<y<<endl;
getch();
}
CBSE Class XI Computer Science Functions (1) 2
 

Please click the link below to download pdf file for CBSE Class XI Computer Science Functions (1).

More Study Material

CBSE Class 11 Computer Science Functions Notes

We hope you liked the above notes for topic Functions which has been designed as per the latest syllabus for Class 11 Computer Science released by CBSE. Students of Class 11 should download and practice the above notes for Class 11 Computer Science regularly. All revision notes have been designed for Computer Science by referring to the most important topics which the students should learn to get better marks in examinations. Studiestoday is the best website for Class 11 students to download all latest study material.

Notes for Computer Science CBSE Class 11 Functions

Our team of expert teachers have referred to the NCERT book for Class 11 Computer Science to design the Computer Science Class 11 notes. If you read the concepts and revision notes for one chapter daily, students will get higher marks in Class 11 exams this year. Daily revision of Computer Science course notes and related study material will help you to have a better understanding of all concepts and also clear all your doubts. You can download all Revision notes for Class 11 Computer Science also from www.studiestoday.com absolutely free of cost in Pdf format. After reading the notes which have been developed as per the latest books also refer to the NCERT solutions for Class 11 Computer Science provided by our teachers

Functions Notes for Computer Science CBSE Class 11

All revision class notes given above for Class 11 Computer Science have been developed as per the latest curriculum and books issued for the current academic year. The students of Class 11 can rest assured that the best teachers have designed the notes of Computer Science so that you are able to revise the entire syllabus if you download and read them carefully. We have also provided a lot of MCQ questions for Class 11 Computer Science in the notes so that you can learn the concepts and also solve questions relating to the topics. All study material for Class 11 Computer Science students have been given on studiestoday.

Functions CBSE Class 11 Computer Science Notes

Regular notes reading helps to build a more comprehensive understanding of Functions concepts. notes play a crucial role in understanding Functions in CBSE Class 11. Students can download all the notes, worksheets, assignments, and practice papers of the same chapter in Class 11 Computer Science in Pdf format. You can print them or read them online on your computer or mobile.

Notes for CBSE Computer Science Class 11 Functions

CBSE Class 11 Computer Science latest books have been used for writing the above notes. If you have exams then you should revise all concepts relating to Functions by taking out a print and keeping them with you. We have also provided a lot of Worksheets for Class 11 Computer Science which you can use to further make yourself stronger in Computer Science

Where can I download latest CBSE Class 11 Computer Science Functions notes

You can download notes for Class 11 Computer Science Functions for latest academic session from StudiesToday.com

Can I download the Notes for Functions Class 11 Computer Science in Pdf format

Yes, you can click on the link above and download notes PDFs for Class 11 Computer Science Functions which you can use for daily revision

Are the revision notes available for Functions Class 11 Computer Science for the latest CBSE academic session

Yes, the notes issued for Class 11 Computer Science Functions have been made available here for latest CBSE session

How can I download the Functions Class 11 Computer Science Notes pdf

You can easily access the link above and download the Class 11 Notes for Computer Science Functions for each topic in Pdf

Is there any charge for the Class 11 Computer Science Functions notes

There is no charge for the notes for CBSE Class 11 Computer Science Functions, you can download everything free of charge

Which is the best online platform to find notes for Functions Class 11 Computer Science

www.studiestoday.com is the best website from which you can download latest notes for Functions Computer Science Class 11

Where can I find topic-wise notes for Class 11 Computer Science Functions

Come to StudiesToday.com to get best quality topic wise notes for Class 11 Computer Science Functions

Can I get latest Functions Class 11 Computer Science revision notes as per CBSE syllabus

We have provided all notes for each topic of Class 11 Computer Science Functions as per latest CBSE syllabus