{"id":10035,"date":"2018-02-15T12:22:11","date_gmt":"2018-02-15T06:52:11","guid":{"rendered":"http:\/\/mycbseguide.com\/blog\/?p=10035"},"modified":"2018-03-17T15:18:39","modified_gmt":"2018-03-17T09:48:39","slug":"functions-cpp-class-11-notes-computer-science","status":"publish","type":"post","link":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/","title":{"rendered":"Functions in CPP class 11 Notes Computer Science"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#CBSE_Guide_Functions_in_CPP_class_11_Notes\" >CBSE Guide \u00a0Functions in CPP class 11 Notes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#Functions_in_CPP_class_11_Notes_Computer_Science\" >Functions in CPP class 11 Notes Computer Science<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#Download_Revision_Notes_as_PDF\" >Download Revision Notes as PDF<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#Functions_in_CPP_class_11_Notes\" >Functions in CPP class 11 Notes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#CBSE_Class-11_Revision_Notes_and_Key_Points\" >CBSE Class-11 Revision Notes and Key Points<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p>CBSE Computer Science Chapter 6 Functions in CPP class 11 Notes Computer Science in PDF are available for free download in myCBSEguide mobile app. The best app for CBSE students now provides \u00a0Functions in CPP class 11 Notes Computer Science latest chapter wise notes for quick preparation of CBSE board exams and school based annual examinations. Class 11 Computer Science notes on Chapter 6\u00a0 Functions in CPP class 11 Notes Computer Science are also available for download in CBSE Guide website.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"CBSE_Guide_Functions_in_CPP_class_11_Notes\"><\/span><strong>CBSE Guide \u00a0Functions in CPP class 11 Notes<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>CBSE guide notes are the comprehensive notes which covers the latest syllabus of CBSE and NCERT. It includes all the topics given in NCERT class 11 Computer Science text book. Users can download CBSE guide quick revision notes from myCBSEguide mobile app and my CBSE guide website.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Functions_in_CPP_class_11_Notes_Computer_Science\"><\/span><strong>Functions in CPP class 11 Notes Computer Science<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Download CBSE class 11th revision notes for Chapter 6\u00a0 Functions in CPP class 11 Notes Computer Science in PDF format for free. Download revision notes for \u00a0Functions in CPP class 11 Notes Computer Science and score high in exams. These are the \u00a0Functions in CPP class 11 Notes Computer Science prepared by team of expert teachers. The revision notes help you revise the whole chapter in minutes. Revising notes in exam days is on of the best tips recommended by teachers during exam days.<\/p>\n<h1 style=\"text-align: center\"><span class=\"ez-toc-section\" id=\"Download_Revision_Notes_as_PDF\"><\/span><a href=\"https:\/\/mycbseguide.com\/downloads\/cbse-class-11-computer-science\/1852\/cbse-revision-notes\/7\/\"><strong>Download Revision Notes as PDF<\/strong><\/a><span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p style=\"text-align: center\"><strong>CBSE Class 11 Computer Science<br \/>\nRevision Notes<br \/>\nFunctions in CPP class 11 Notes Computer Science<br \/>\nChapter -6<\/strong><\/p>\n<p><strong>Objectives:<\/strong><br \/>\n\u2022 To analyze how modularity is implemented in a program at its lowest level.<br \/>\n\u2022 To appreciate the use and importance of function in C++<br \/>\n\u2022 To program different types of functions and implement them practically.<br \/>\n\u2022 To understand difference between User Defined Function and Library function.<\/p>\n<p><strong>3.1: Why to use functions?<\/strong><br \/>\nWho likes unnecessary repetition of task? No body in this world. Everybody thinks of re usability these days in every aspect of life. What will you do if your cycle wheel rim breaks down on fine day? Will you\u00a0throw the whole cycle or sell the cycle as scrap? No exactly not because cycles are designed in such a way that each of its parts can be repaired or replaced. So you will get a new cycle rim from market and will get it fitted in your cycle! This design of cycle where each of its parts have its own unique functionality and could be reassembled together to form a complete cycle is known as <strong>Modular approach of designing<\/strong>. Each of the cycles part can thought as a Module which serves some purpose in the whole cycle but is very essential for proper functioning of the cycle. The whole concept is nothing but based on <strong>\u201cDivide and Rule philosophy\u201d<\/strong>. A bigger system is divided into smaller components so that each of these smaller parts could handled easily and effectively. These smaller parts when integrated gives rise to the bigger system.<br \/>\nJust think GOD has also created human beings as a modular entity ! We humans have a body which is integration of organ system and each of these organ system is again integration of some organs. So here organs are acting as modules. These modules (organs) could be taken care of individually when we often fall ill.<br \/>\nCan you rightly describe what is opposite word for modularity? Any system which is not modular is known as monolithic or indivisible. A monolithic system does not have any parts or modules, from top to bottom it is one piece.<br \/>\nSoftware industry has also adopted the modular approach of design where a big software is divided into several modules. Each of the modules are designed for performing specialized task in the whole software. These modules interact with other modules of the system to carry out essential functionality of the whole system.<br \/>\nEach module during its course of execution repeats same type of task, so whenever the whole system requires a specific type of task, for which a particular module is responsible, it calls or invokes that module and the task is done. This calling of module to perform a certain action, can be done several number of times while the software as a whole executes.<br \/>\nLet us understand the above concept with the help of a real life example. Suppose our KVS is going to develop a centralized software for managing all Kvs across the country. While designing such a software KVS has to divide the whole operation of the software into three big modules called as: Admin , Academic and Accounts, each of these modules could be again broken down into many simple and small sub-modules like Admin Module can have Admission , Construction , Recruitment, etc. whereas the Academics can again have sub-modules like Student Registration, Examination , Results etc.<br \/>\nThe following diagram describes the whole concept very easily:<br \/>\n<img decoding=\"async\" src=\"https:\/\/media-mycbseguide.s3.amazonaws.com\/images\/static\/revise\/11\/computer\/ch4c\/image001.jpg\" \/><br \/>\nWhen the whole software is divided into modules as seen in the above case scenario then the following benefits could be harvested:<br \/>\ni) Each module can be tracked individually and separately without taking much care of other modules.<br \/>\nii) A module is a reusable piece of program which could used again and again. Suppose that Navodaya Vidyalaya now wants to make a software like KVS then they can re-use the same modules of KVS with some changes (customization).<br \/>\niii) If error is found in one module the functionality of that particular module and its associated modules would be disturbed, the whole software will not suffer. Thus errors can be tracked easily and debugged in much less time, because programmer will know which module is causing error, so he will debug that particular module only not the whole software (much like when you visit doctor suffering from common cold, the doctor does not checks your brain!)<br \/>\niv) System upgradation (the process of changing from older system to newer one) becomes much easier because only those modules which needs upgradation will be dealt leaving other things as it is.<br \/>\nSo we see that modularization of a system gives us much independence and flexibility in terms of fast program development, easier debugging, and re-usability.<\/p>\n<p><strong>How Functions in C++ are related to program modules:<\/strong><br \/>\nJust as a software is divided into modules, each modules into sub-modules, a sub-module is further divided into several functions. So we may call a function as a micro-level module of a bigger software.<br \/>\nA function in C++:<br \/>\n&#8211; is smaller section of code of bigger module\/program.<br \/>\n&#8211; is re-usable piece of code.<br \/>\n&#8211; is very specific in nature as it performs a specific task.<br \/>\n&#8211; is often called many times in a program.<br \/>\nThus a C++ function have all the advantages which a module has in a software.<\/p>\n<p><strong>3.2: Types of function:<\/strong><br \/>\nFunctions in C++ are of two basic types:<br \/>\na) User Defined: written by a programmer as per his\/her requirement domain.<br \/>\nb) Library Function: already available with C++ compiler and stored as Library, from where they can be called and used in any C++ program.<\/p>\n<p><strong>3.2.1: User Defined Functions:<\/strong><br \/>\nA user define function in C++ is always created by programmer according to his\/her program requirements. Suppose, if some programmer is making software for school management then his list of user defined functions may have functions such as: getFee( ), calcResult( ), setExam( ), all these functions will be used only in school management software not any where else, as they are specially tailored function for school management software.<br \/>\nLet us see the syntax to declare a user defined function:<\/p>\n<p><strong>Function Declaration:<\/strong><br \/>\n&lt;return type&gt; function_name(&lt;parameter list&gt;);<br \/>\nwhere:<br \/>\nreturn type: = is the value which the function returns, if function does not returns any value then we may write there void.<br \/>\nfunction_name: = any valid C++ identifier name<br \/>\nparameter list: = declaration of variables of different data types separated by comma these values are inputs passed from outside to the function.<br \/>\nThe function declaration as per the syntax given above is also called as <strong>prototype declaration<\/strong>. In C++ it is compulsory to declare prototype of a function before defining and using it.<br \/>\nThe parameter variable in the declaration are also called <strong>Formal parameters<\/strong>.<\/p>\n<p><strong>Function Definition:<\/strong><br \/>\nWhile function definition described about the structure of a function, its inputs and output type , the definition of function actually implements the code of the function. While defining a function we add<br \/>\nC++ code to its block as per requirement.<br \/>\nSyntax: &lt;return type&gt; function_name(&lt;parameter list&gt;)<br \/>\n{\u2026.}<br \/>\nExample: Declare and define a function which finds the sum of two integers and returns it.<br \/>\nint getSum( int , int ); \/\/ declaration of a function int getSum( int a , int b )<\/p>\n<p>\/\/ definition of the\u00a0function<\/p>\n<p>int getSum( int a , int b )<br \/>\n{<br \/>\nint r = a+b;<br \/>\nreturn r;<br \/>\n}<br \/>\nThe above function declaration has a return type as integer, because the function is meant to return a sum of two numbers. Two numbers to be added are passed to the function as input parameter. The parameter list is having two int separated by a comma ( , ) it is not compulsory to write variable names of the parameters in declaration. A semicolon is terminating the declaration of function.<br \/>\nThe definition of function is having code written within its scope where the sum is calculated over the passed parameters a and b and the result is returned using a keyword return. It is compulsory that the return data type must be same as that of the datatype of the variable returned using return statement.<\/p>\n<p><strong>Workout yourself:<\/strong><br \/>\nDeclare the prototype of a function which:<br \/>\ni) multiplies three integers and return the product<br \/>\nii) checks whether a passed integer parameter is even or odd<br \/>\niii) prints your name 20 times.<br \/>\nConsider the few more definition of functions related to various program:<\/p>\n<p><strong>Function 3.1:<\/strong><br \/>\n\/\/ function to check whether a given number is prime or not<br \/>\nint isPrime(int );<br \/>\nint isPrime(int num )<br \/>\n{<br \/>\nint count = 0;<br \/>\nfor( int i = 1\u00a0; i &lt;\u00a0=num ; i++)<br \/>\nif( num % i\u00a0== 0)<br \/>\ncount++;<br \/>\nif (count &gt; 2)<br \/>\nreturn 0; \/\/ more than two factors means it is not prime, hence a false value is returned<br \/>\nelse<br \/>\nreturn 1; \/\/ exactly two factors i.e. 1 and num itself means num is prime, hence return a<br \/>\n\/\/ true value i.e. 1<br \/>\n}<\/p>\n<p>In the above function if the passed parameter to the function i.e. num would be a prime it will have exactly two factors counted out in variable count and if not would have more than 2 factors. After we conduct a looping over the num to check its divisibility by every value from 1 to num we get count incremented whenever num is divisible by i (looping-variable). So on the termination of loop the variable count stores the total number of times num gets divisible in the loop.<br \/>\nWe check this count value to find whether it is more than two or not, if it is more than two it means num has more than two factors and hence it does not satisfies to be a prime, hence we return an integer 0 to designate that it is not prime, other wise we return 1.<br \/>\nInstead of returning 1 and 0 from function you directly print using cout that num is prime or not, but then don&#8217;t forget to change the return type of the function isPrime( ) to void.<\/p>\n<p><strong>Function 3.2:<\/strong><br \/>\n\/\/ function to print all even numbers found between two given integer parameters<br \/>\nvoid findSum( int , int);<br \/>\nvoid findSum(int i , int j )<br \/>\n{<br \/>\nint sum = 0;<br \/>\nif( i &lt;= j)<br \/>\n{<br \/>\nfor( int k = i ; k&lt;= j ; k++)<br \/>\nif( k % 2 == 0)<br \/>\ncout&lt;&lt; k &lt;&lt; \u201c,\u201d;<br \/>\n}<br \/>\nelse<br \/>\ncout&lt;&lt; \u201cRange not valid\u201d;<br \/>\n}<\/p>\n<p>Explanation:<br \/>\nIn the above function there was no need of returning any value from its scope, we have to print the even numbers found within the for loop. Since a function can return only one value at a time, and once its returns a value the scope of the function finishes all the variables declared in its scope dies off and are no more available to be used again. So instead of returning we printed the multiple outputs using a cout. Look how we have declared the function return type as void when we are not returning any value from its scope.<\/p>\n<p><strong>Function 3.3:<\/strong><br \/>\n\/\/program to find the HCF of two inputted numbers:<br \/>\nvoid getHCF( );<br \/>\nvoid getHCF( )<br \/>\n{<br \/>\nint n1 = 0, n2 = 0;<br \/>\nint hcf = 0;<br \/>\ncout&lt;&lt; &#8220;Input two numbers whose hcf is to be found\u201d;<br \/>\ncin&gt;&gt;n1&gt;&gt;n2;<br \/>\nif( n1 == n2 )<br \/>\ncout&lt;&lt; n1;<br \/>\nelse if(n1 &lt; n2)<br \/>\n{<br \/>\nfor(int d = 1; d &lt;= n2; d++)<br \/>\n{<br \/>\nif(n1 % d == 0 &amp;&amp; n2 % d == 0)<br \/>\n{<br \/>\nhcf = d;<br \/>\n}<br \/>\n}<br \/>\ncout&lt;&lt; &#8220;The hcf is &#8221; &lt;&lt; hcf;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nfor(int d = 1 ; d &lt;= n1 ; d++)<br \/>\n{<br \/>\nif(n1 % d == 0 &amp;&amp; n2 % d == 0)<br \/>\n{<br \/>\nhcf = d;<br \/>\n}<br \/>\n}<br \/>\ncout&lt;&lt; &#8220;The hcf is &#8221; &lt;&lt; hcf;<br \/>\n}<br \/>\n} \/\/ end of function<br \/>\nExplanation:<br \/>\nLook at the function definition of the above function, since the function is taking the two required inputs within its scope using cout and cin, we had not passed any parameters to function thus we have kept the paranthesis ( ) empty. Also as the function directly prints the output there is no need to return any value from its scope, hence return type is void.<br \/>\nThe logic of the function is simple: we are finding the highest of the two numbers and then running a loop from 1 to the highest number and in each iteration we are finding out whether the iterator value divides both the numbers, if it then we put that iterator&#8217;s value into variable hcf, changing the old value of variable hcf. Thus at the end of the loop the hcf is left out with the Highest Common Factor and we print it with a cout.<\/p>\n<p><strong>Function 3.4:<\/strong><br \/>\n\/\/ function to find the Simple Interest on a given principal, rate, and time where the default \u00a0\/\/\u00a0value of the\u00a0time parameter is kept 1 yr.<br \/>\nfloat getSimpleInt(float , float , float=1 );<br \/>\nfloat getSimpleInt(float p , float rate , float time)<br \/>\n{<br \/>\nfloat si = (p * rate * time)\/100;<br \/>\nreturn si;<br \/>\n}<br \/>\nThe above program is having a new type of parameter known as default parameter. A C++ function parameter can be made default if that parameter is assigned any constant either at the time of declaring it or at the time of its definition. When we associate a default value to a parameter as we have associated 1 with last parameter, then this value will be used if the function is getting called without passing this parameter in the call. This we will again see ahead while discussing a function call. The logic of the program is quite easy to understand. Anyway default parameters must be always declared from right to left, otherwise will cause error. i.e you can&#8217;t make principal alone as default. Following declaration is Invalid.<br \/>\nfloat SimpleInt(float p = 1000 , float rate , float t=1);<br \/>\nor<br \/>\nfloat SimpleInt(float p , float rate = 2 , float t);<\/p>\n<p><strong>If you want to make principal as default parameter you have to make all the parameters on its right side default as well.<\/strong><br \/>\nSo the valid declaration in such case would be:<br \/>\nfloat SimpleInt(float p = 1000 , float rate=2 , float t=1);<\/p>\n<p><strong>3.2.2: Calling a C++ Function from a program:<\/strong><br \/>\nYou might be wondering that err!! in the above few function examples, the author has forgot to write a main( ) function <strong>( a main is also a function!)<\/strong> , then <strong>how the code written within the scope of the function would be executed?<\/strong> You might be also wondering that in The general syntax of calling a function would be in above functions 3.1, 3.2 and 3.4 the <strong>author has not asked the user to input values for variables used in these functions?<\/strong><\/p>\n<p>The codes within the scope of a function never gets executed if it not called from the scope of other scope. Just like your badly damaged non-functional land-line is not going to repaired of its own until unless you are not calling a mechanic!. <strong>So a function has to be called from the scope of another function so that the code within the scope of the function works.<\/strong> Usually we make this call from the scope of main( ) function, <strong>but we can call a function from the scope of any other function if the called function is defined globally.<\/strong><br \/>\nThe other doubt that author has not provided the input values in few function is also reasonable because a <strong>user should input the parameter values, if not error will be given. A user inputs the parameter values from the same scope where from it calls the function.<\/strong><\/p>\n<p><strong>Let us now see the syntax of calling a function:<\/strong><br \/>\nA function call for a non-returning type function (return type is void):<br \/>\nfunction_name( &lt;parameter_list_if_it is defined_or_leave_it_blank);<br \/>\nA function call for a non-returning type function (return type is some datatype) :<br \/>\nreturn_datatype &lt;var_name&gt; = function_name( &lt;parameter_list_if_it is defined_or_leave_it_blank);<br \/>\nWhile calling a function the value of the parameter are also called <strong>actual parameter.<\/strong><br \/>\nNow let us call all the four functions which we have defined earlier i.e. Finction 3.1 to 3.4<br \/>\n\/\/calling of function 3.1: int isPrime(int ); from main( )<br \/>\nvoid main ( )<br \/>\n{<br \/>\nint val = 0;<br \/>\ncout&lt;&lt;\u201dinput a integer to be checked\u201d;<br \/>\ncin&gt;&gt; val;<br \/>\n<strong>int r = isPrime( val );<\/strong> \/\/second type of calling<br \/>\nif ( r == 1 )<br \/>\ncout&lt;&lt; val &lt;&lt; &#8221; is prime\u201d; \/\/ function is returning 1 only when it found the num be<br \/>\n\/\/ a prime value.<br \/>\nelse<br \/>\ncout&lt;&lt; val &lt;&lt; &#8221; is not a prime\u201d;<br \/>\n}<br \/>\n\/\/calling of function 3.2: void findSum( int , int); from main( )<br \/>\nvoid main ( )<br \/>\n{<br \/>\nint v1 = 0, v2 = 0;<br \/>\ncout&lt;&lt;\u201dinput two integer to be checked\u201d;<br \/>\ncin&gt;&gt;v1&gt;&gt;v2;<\/p>\n<p><strong>int s = findSum( v1 , v2); \/\/second type of calling<\/strong><br \/>\ncout&lt;&lt; &#8220;The sum is\u201d&lt;&lt; s; \/\/ function returns the sum which is caught by s and<br \/>\n\/\/ shown!!<br \/>\n}<br \/>\n\/\/calling of function 3.3: void getHCF( ); from main( ) void main ( )<br \/>\n{<\/p>\n<p><strong>getHCF( ); \/\/first type of calling<\/strong><br \/>\n\/\/ though it appears that this type of calling is an easier method, but it is<br \/>\n\/\/ rarely used in actual software making industries.<br \/>\n}<br \/>\n\/\/calling of function 3.4: float getSimpleInt(float , float , float=1 );; from main( ); we may call this \/\/function a different ways let us see<br \/>\nvoid main()<br \/>\n{<br \/>\nfloat prnc = 5000, rt = 10, tm = 5;<br \/>\nfloat si = 0.0;<br \/>\n\/\/ first call produces si: Rs 2500<br \/>\nsi = getSimpleInt(prnc, rt, tm);<br \/>\n\/\/ second call produces si = Rs. 500<\/p>\n<p><strong>si = getSimpleInt(prnc , rt );<\/strong> \/\/ last parameter is omitted as it was declared as<br \/>\n\/\/ as optional type with a default value = 1<br \/>\n}<\/p>\n<p><strong>3.2.3: Arguments passed by value and by reference<\/strong><br \/>\nUntil now, in all the functions we have seen, the arguments passed to the functions have been passed by value. This means that when calling a function with parameters, what we have passed to the function were copies of their values but never the variables themselves. For example, suppose that we called our first function addition using the following code:<br \/>\nint x=5, y=3, z;<br \/>\nz = addition (x , y );<br \/>\nWhat we did in this case was to call to function addition passing the values of x and y, i.e. 5 and 3 respectively, but not the variables x and y themselves.<br \/>\n<img decoding=\"async\" id=\"Picture 2\" src=\"https:\/\/media-mycbseguide.s3.amazonaws.com\/images\/static\/revise\/11\/computer\/ch4c\/image002.jpg\" \/><br \/>\nThis way, when the function addition is called, the value of its local variables a and b become 5 and 3 respectively, but any modification to either a or b within the function addition will not have any effect in the values of x and y outside it, because variables x and y were not themselves passed to\u00a0the function, but only copies of their values are passed to the function.<br \/>\nBut there might be some cases where you need to manipulate from inside a function the value of an external variable. For that purpose we can use arguments passed by reference, as in the function duplicate of the following example:<br \/>\n\/\/ passing parameters by reference<br \/>\n#include &lt;iostream.h&gt;<br \/>\nvoid duplicate (int&amp; a, int&amp; b, int&amp; c)<br \/>\n{<br \/>\na*=2;<br \/>\nb*=2;<br \/>\nc*=2;<br \/>\n}<br \/>\nint main ()<br \/>\n{<br \/>\nint x=1, y=3, z=7;<br \/>\nduplicate (x, y, z);<br \/>\ncout &lt;&lt; &#8220;x=&#8221; &lt;&lt; x &lt;&lt; &#8220;, y=&#8221; &lt;&lt; y &lt;&lt; &#8220;, z=&#8221; &lt;&lt; z;<br \/>\nreturn 0;<br \/>\n}<br \/>\noutput: x=2, y=6, z=14<\/p>\n<p>The first thing that should call your attention is that in the declaration of duplicate the type of each parameter was followed by an ampersand sign (&amp;). This ampersand is what specifies that their corresponding arguments are to be passed by reference instead of by value.<br \/>\nWhen a variable is passed by reference we are not passing a copy of its value, but we are somehow passing the variable itself to the function and any modification that we do to the local variables will have an effect in their counterpart variables passed as arguments in the call to the function.<br \/>\n<img decoding=\"async\" id=\"Picture 3\" src=\"https:\/\/media-mycbseguide.s3.amazonaws.com\/images\/static\/revise\/11\/computer\/ch4c\/image003.jpg\" \/><br \/>\nTo explain it in another way, we associate a, b and c with the arguments passed on the function call (x, y and z) and any change that we do on a within the function will affect the value of x outside it. Any change that we do on b will affect y, and the same with c and z.<br \/>\nThat is why our program&#8217;s output, that shows the values stored in x, y and z after the call to duplicate, shows the values of all the three variables of main doubled.<br \/>\nIf when declaring the following function:<br \/>\n<strong>void duplicate (int&amp; a, int&amp; b, int&amp; c)<\/strong><br \/>\nwe had declared it this way:<br \/>\n<strong>void duplicate (int a, int b, int c)<\/strong><br \/>\ni. e., without the ampersand signs (&amp;), we would have not passed the variables by reference, but a copy of their values instead, and therefore, the output on screen of our program would have been the values of x, y and z without having been modified.<br \/>\nPassing by reference is also an effective way to allow a function to return more than one value. For example, here is a function that returns the previous and next numbers of the first parameter passed.<br \/>\n\/\/ more than one returning value<br \/>\n#include &lt;iostream.h&gt;<br \/>\nvoid prevnext (int x, int&amp; prev, int&amp; next)<br \/>\n{<br \/>\nprev = x-1;<br \/>\nnext = x+1;<br \/>\n}<br \/>\nint main ()<br \/>\n{<br \/>\nint x=100, y, z;<br \/>\nprevnext (x, y, z);<br \/>\ncout &lt;&lt; &#8220;Previous=&#8221; &lt;&lt; y &lt;&lt; &#8220;, Next=&#8221; &lt;&lt; z;<br \/>\nreturn 0;<br \/>\n}<br \/>\nOuput: Previous=99, Next=101<\/p>\n<p><strong>3.2.4: Arguments passed as const parameter<\/strong><br \/>\nLook at the following protoype :<br \/>\nvoid myFunction( const int x = 10 );<br \/>\nThe above function is declaring its first parameter as const i.e even if the user tries to pass value to this argument the new value will not change the value assigned to the const parameter, even in the scope of the function also it will remain unchaged.<br \/>\nLet us see one example:<br \/>\nvoid myFunction( const int x = 10 )<br \/>\n{<br \/>\ncout&lt;&lt; x;<br \/>\n}<br \/>\nmain( )<br \/>\n{<br \/>\nmyFunction(3 ); \/\/ even if the function is passed with a value 3 it will not accept.<br \/>\n}<br \/>\nThe output of the code will be 10 instead of 3.<br \/>\nSo whenever you\u00a0want to restrict your parameter to a fixed value , declare it as const. Some compiler may produce error.<\/p>\n<p><strong>check your progress:<\/strong><br \/>\n1. Write a function ( waf) to find the largest out of three integers as input parameters.<br \/>\n2. W.a.f to find whether a number either divisible by its predecessor or\u00a0successor.<br \/>\n3. W.a.f which returns the sum of digits of any integer passed to it as parameter.<br \/>\n4. W.a.f to calculate discount amount on a given rate of item and discount % offered.<\/p>\n<p><strong>3.1.2: Library Functions:<\/strong><br \/>\nThese functions are ready-made functions available with C++ compiler. They are stored under various header files. A header file is a normal C++ program file with .h extension containing the code for all the C++ functions defined under it. Header files group functions according to its use and common feature.<br \/>\nFollowing are some important Header files and useful functions within them:<br \/>\n1. stdio.h (standard I\/O function) : gets( ) , puts( )<br \/>\n2. ctype.h (character type function) : isalnum( ) , isalpha( ) isdigit ( ), islower ( ),isupper ( ), tolower ( ), toupper( )<br \/>\n3. string.h (string related function) : strcpy( ), strcat ( ) strlen( ), strcmp( ) , strcmpi( ) , strrev( ) strupr( ) , strlwr( )<br \/>\n4. math.h (mathematical function) : fabs( ), pow ( ), sqrt ( ), sin ( ), cos ( ), abs ( )<br \/>\n5. stdlib.h : randomize ( ), random ( ), itoa( ) , atoi().<br \/>\nThe above list is just few of the header files and functions available under them, but actually there are many more. If you want to learn their use go to the help menu of your turbo C++ compiler and search out function list and learn its prototype.<br \/>\nThe calling of library function is just like User defined function, with just few differences as follows:<br \/>\ni) We don&#8217;t have to declare and define library function.<br \/>\nii) We must include the appropriate header files, which the function belongs to, in global area so as these functions could be linked with the program and called.<br \/>\nLibrary functions also may or may not return values. If it is returning some values then the value should be assigned to appropriate variable with valid datatype.<br \/>\nLet us deal with each of these library functions by calling the them from programs:<br \/>\n<strong>gets( ) and puts( ):<\/strong> these functions are used to input and output strings on the console during\u00a0program run-time.<br \/>\ngets( ) accept a string input from user to be stored in a character array.<br \/>\nputs() displays a string output to user stored in a character array.<\/p>\n<p><strong>program 3.1:<\/strong><br \/>\n\/\/ program to use gets( ) and puts( )<br \/>\n#include &lt;iostream.h&gt;<br \/>\n<strong>#include&lt;stdio.h&gt;<\/strong> \/\/must include this line so that gets(), puts() could be linked and called<br \/>\nvoid main( )<br \/>\n{<br \/>\nchar myname[25]; \/\/declaring a character array of size 25<\/p>\n<p>cout&lt;&lt;\u201dinput your name : \u201c;<br \/>\ngets(myname); \/\/ just pass the array name into the parameter of the function.<br \/>\ncout&lt;&lt; \u201cYou have inputted your name as: \u201c ;<br \/>\nputs(myname);<br \/>\n}<br \/>\n<strong>isalnum( ), isalpha( ), isdigit( ):<\/strong> checks whether the character which is passed as parameter to them are alphanumeric or alphabetic or a digit (&#8216;0&#8217; to &#8216;9&#8217;) . If checking is true functions returns 1.<\/p>\n<p><strong>program 3.2:<\/strong><br \/>\n\/\/program to use isalnum() , isalpha(), isdigit()<br \/>\n#include &lt;iostream.h&gt;<br \/>\n<strong>#include&lt;ctype.h&gt;<\/strong><br \/>\nvoid main( )<br \/>\n{<br \/>\nchar ch;<br \/>\ncout&lt;&lt;\u201dInput a character\u201d;<br \/>\ncin&gt;&gt;ch;<br \/>\nif( isdigit(ch) == 1)<br \/>\ncout&lt;&lt;\u201dThe inputed character is a digit\u201d;<br \/>\nelse if(isalnum(ch) == 1)<br \/>\ncout&lt;&lt;\u201dThe inputed character is an alphanumeric\u201d;<br \/>\nelse if(isalpha(ch) == 1)<br \/>\ncout&lt;&lt;\u201dThe inputed character is an alphabet.<br \/>\n}<br \/>\n<strong>islower ( ),isupper ( ), tolower ( ), toupper( ): <\/strong>islower( ) checks whether a character has lower case, isupper( ) does opposite. tolower( ) converts any character passed to it in its lower case and the toupper( ) does opposite.<\/p>\n<p><strong>program 3.3:<\/strong><br \/>\n\/\/program to use islower (),isupper (), tolower (), toupper()<br \/>\n#include &lt;iostream.h&gt;<br \/>\n<strong>#include&lt;ctype.h&gt;<\/strong><br \/>\nvoid main( )<br \/>\n{<br \/>\nchar ch;<br \/>\ncout&lt;&lt;\u201dInput a character\u201d;<br \/>\ncin&gt;&gt;ch;<br \/>\nif( isupper(ch) == 1) \/\/checks if character is in upper case converts the character to lowercase<br \/>\n{<br \/>\ntolower(ch);<br \/>\ncout&lt;&lt;ch;<br \/>\n}<br \/>\nelse if(islower(ch) == 1) \/\/ checks if character is in lower case converts the character to<br \/>\n{ \/\/ uppercase<br \/>\ntoupper(ch);<br \/>\ncout&lt;&lt;ch;<br \/>\n}<br \/>\n}<br \/>\n<strong>fabs ( ), pow ( ), sqrt ( ), sin ( ), cos ( ), abs ( ):<\/strong><\/p>\n<p><strong>Program 3.4<\/strong><br \/>\n#include &lt;iostream.h&gt;<br \/>\n#include &lt;math.h&gt;<br \/>\n#define PI 3.14159265 \/\/ macro definition PI will always hold 3.14159265<br \/>\nint main()<br \/>\n{<br \/>\ncout&lt;&lt;&#8220;The absolute value of 3.1416 is : &#8220;&lt;&lt;fabs (3.1416) ; \/\/ abs( ) also acts similarly but only on int data<br \/>\ncout&lt;&lt;&#8220;The absolute value of -10.6 is &#8220;&lt;&lt; fabs (-10.6);<br \/>\ncout&lt;&lt;\u201d7.0 A 3 = &#8221; &lt;&lt;pow (7.0,3);<br \/>\ncout&lt;&lt;&#8220;4.73 A 12 = &#8221; &lt;&lt; pow (4.73,12);<br \/>\ncout&lt;&lt;&#8220;32.01 A 1.54 = &#8220;&lt;&lt;pow (32.01,1.54);<br \/>\ndouble param, result;<br \/>\nparam = 1024.0;<br \/>\nresult = sqrt (param);<br \/>\ncout&lt;&lt;&#8220;sqrt() = &#8220;&lt;&lt;result ;<br \/>\nresult = sin (param*PI\/180); \/\/ in similar way cos( ), tan() will be called.<br \/>\ncout&lt;&lt;&#8220;The sine of &#8221; &lt;&lt;param&lt;&lt;\u201d degrees is: &#8220;&lt;&lt; result ;<br \/>\nreturn 0;<br \/>\n}<br \/>\n<strong>randomize ( ), random ( ), itoa( ) , atoi():<\/strong><br \/>\nThe above functions belongs to header file stdlib.h . Let us observe the use of these functions:<br \/>\n<strong>randomize( ):<\/strong> This function provides the seed value and an algorithm to help random( ) function in generating random numbers. The seed value may be taken from current system\u2019s time.<br \/>\n<strong>random(&lt;int&gt;):<\/strong> This function accepts an integer parameter say x and then generates a random value between 0 to x-1<br \/>\nfor example: random(7) will generate numbers between 0 to 6.<br \/>\nTo generate random numbers between a lower and upper limit we can use following formula:<br \/>\nrandom(U &#8211; L +1 ) + L<br \/>\nwhere U and L are the Upper limit and Lower limit values between which we want to find out random values.<br \/>\nFor example: If we want to find random numbers between 10 to 100 then we have to write code as: random(100 -10 +1) + 10 ; \/\/ generates random number between 10 to 100<\/p>\n<p><strong>Check you progress:<\/strong><br \/>\n1. Name the header files to which the following functions belongs:<br \/>\ni) toupper( ), ii) fabs( ), iii) sqrt( ), iv) strcpy( )<br \/>\n2. Write a program to check whether a string variable is palidrome or not , using only library function.<\/p>\n<p><strong>Summary:<\/strong><br \/>\n1. Functions provides modularity to programs.<br \/>\n2. Functions can be re-used.<br \/>\n3. Functions can be of two types: User Defined and Library.<br \/>\n4. We have to declare and define user define functions either in program-scope or header files to use them in a program.<br \/>\n5. To use library functions appropriate header files must be included using #include directive<br \/>\n6. A prototype of a function means, the number, data-types and sequence of its parameters.<br \/>\n7. During function call it is very necessary to pass parameter values (actual parameters) to the\u00a0function in the same order and type as define in its prototype.<br \/>\n8. The Library functions are kept within header files. These header files are made as per the working nature of the function.<br \/>\n9. A big software must use modular approach of programming to which function is as essential programming element.<br \/>\n10. Sometimes instead of passing values as parameters to the function we pass its references to the function. This type of calling is known as call by reference.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Functions_in_CPP_class_11_Notes\"><\/span>Functions in CPP class 11 Notes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>CBSE Revision notes (PDF Download) Free<\/li>\n<li>CBSE Revision notes for Class 11 Computer Science PDF<\/li>\n<li>CBSE Revision notes Class 11 Computer Science \u2013 CBSE<\/li>\n<li>CBSE Revisions notes and Key Points Class 11 Computer Science<\/li>\n<li>Summary of the NCERT books all chapters in Computer Science class 11<\/li>\n<li>Short notes for CBSE class 11th Computer Science<\/li>\n<li>Key notes and chapter summary of Computer Science class 11<\/li>\n<li>Quick revision notes for CBSE exams<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"CBSE_Class-11_Revision_Notes_and_Key_Points\"><\/span><strong>CBSE Class-11 Revision Notes and Key Points<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Functions in CPP class 11 Notes Computer Science.CBSE quick revision note for class-11 Mathematics, Physics, Chemistry, Biology and other subject are very helpful to revise the whole syllabus during exam days. The revision notes covers all important formulas and concepts given in the chapter. Even if you wish to have an overview of a chapter, quick revision notes are here to do if for you. These notes will certainly save your time during stressful exam days.<\/p>\n<ul>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-physics\/1340\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Physics<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-chemistry\/1356\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Chemistry<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-mathematics\/1371\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Mathematics<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-biology\/1388\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Biology<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-accountancy\/1411\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Accountancy<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-economics\/1423\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Economics<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-business-studies\/1740\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Business Studies<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-computer-science\/1852\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Computer Science<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-informatics-practices\/1874\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Informatics Practices<\/a><\/li>\n<li><a href=\"http:\/\/mycbseguide.com\/downloads\/cbse-class-11-geography\/1864\/cbse-revision-notes\/7\/\">Revision Notes for class-11 Geography<\/a><\/li>\n<\/ul>\n<p>To download\u00a0 Functions in CPP class 11 Notes, sample paper for class 11 Chemistry, Physics, Biology, History, Political Science, Economics, Geography, Computer Science, Home Science, Accountancy, Business Studies and Home Science; do check myCBSEguide app or website. myCBSEguide provides sample papers with solution, test papers for chapter-wise practice, NCERT solutions, NCERT Exemplar solutions, quick revision notes for ready reference, CBSE guess papers and CBSE important question papers. Sample Paper all are made available through\u00a0<a href=\"https:\/\/play.google.com\/store\/apps\/details?id=in.techchefs.MyCBSEGuide&amp;referrer=utm_source%3Dmycbse_bottom%26utm_medium%3Dtext%26utm_campaign%3Dmycbseads\"><strong>the best app for CBSE students<\/strong><\/a>\u00a0and myCBSEguide website.<\/p>\n<ul>\n<li class=\"entry-title\"><a href=\"https:\/\/mycbseguide.com\/blog\/computer-fundamentals-class-11-notes-computer-science\/\">Computer Fundamentals class 11 Notes Computer Science<\/a><\/li>\n<li class=\"entry-title\"><a href=\"https:\/\/mycbseguide.com\/blog\/introduction-to-cpp-class-11-notes-computer-science\/\">Introduction to CPP class 11 Notes Computer Science<\/a><\/li>\n<li class=\"entry-title\"><a href=\"https:\/\/mycbseguide.com\/blog\/using-c-constructs-class-11-notes-computer-science\/\">Using CPP constructs class 11 Notes Computer Science<\/a><\/li>\n<li class=\"entry-title\"><a href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\">Functions in CPP class 11 Notes Computer Science<\/a><\/li>\n<li class=\"entry-title\"><a href=\"https:\/\/mycbseguide.com\/blog\/arrays-and-structures-class-11-notes-computer-science\/\">Arrays and Structures class 11 Notes Computer Science<\/a><\/li>\n<li class=\"entry-title\"><a href=\"https:\/\/mycbseguide.com\/blog\/programming-methodology-class-11-notes-computer-science-2\/\">Programming Methodology class 11 Notes Computer Science<\/a><\/li>\n<li><a href=\"https:\/\/mycbseguide.com\/blog\/programming-c-p-p-class-11-notes-computer-science\/\">Programming in C P P class 11 Notes Computer Science<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CBSE Computer Science Chapter 6 Functions in CPP class 11 Notes Computer Science in PDF are available for free download in myCBSEguide mobile app. The best app for CBSE students now provides \u00a0Functions in CPP class 11 Notes Computer Science latest chapter wise notes for quick preparation of CBSE board exams and school based annual &#8230; <a title=\"Functions in CPP class 11 Notes Computer Science\" class=\"read-more\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\" aria-label=\"More on Functions in CPP class 11 Notes Computer Science\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":10009,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,456],"tags":[457,150,326,804,426,240],"class_list":["post-10035","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cbse-class-11","category-revision-notes","tag-cbse-notes","tag-cbse-notes-and-key-points","tag-computer-science","tag-functions-in-cpp","tag-quick-revision","tag-quick-revision-notes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Functions in CPP class 11 Notes Computer Science | myCBSEguide<\/title>\n<meta name=\"description\" content=\"Functions in CPP class 11 Notes Computer Science Chapter 6 in PDF format for free download. Latest chapter wise notes for CBSE exams.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Functions in CPP class 11 Notes Computer Science | myCBSEguide\" \/>\n<meta property=\"og:description\" content=\"Functions in CPP class 11 Notes Computer Science Chapter 6 in PDF format for free download. Latest chapter wise notes for CBSE exams.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\" \/>\n<meta property=\"og:site_name\" content=\"myCBSEguide\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mycbseguide\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-15T06:52:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-17T09:48:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mycbseguide.com\/blog\/wp-content\/uploads\/2016\/09\/mycbseguide_n.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"599\" \/>\n\t<meta property=\"og:image:height\" content=\"242\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"myCBSEguide\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mycbseguide\" \/>\n<meta name=\"twitter:site\" content=\"@mycbseguide\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"myCBSEguide\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"26 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\"},\"author\":{\"name\":\"myCBSEguide\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/#\/schema\/person\/f67796d5f5c5a468e8c680aaaad21519\"},\"headline\":\"Functions in CPP class 11 Notes Computer Science\",\"datePublished\":\"2018-02-15T06:52:11+00:00\",\"dateModified\":\"2018-03-17T09:48:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\"},\"wordCount\":5235,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage\"},\"thumbnailUrl\":\"\",\"keywords\":[\"CBSE Notes\",\"CBSE Notes and Key Points\",\"Computer Science\",\"Functions in CPP\",\"Quick Revision\",\"Quick Revision Notes\"],\"articleSection\":[\"Class 11\",\"Revision Notes\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\",\"url\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\",\"name\":\"Functions in CPP class 11 Notes Computer Science | myCBSEguide\",\"isPartOf\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2018-02-15T06:52:11+00:00\",\"dateModified\":\"2018-03-17T09:48:39+00:00\",\"description\":\"Functions in CPP class 11 Notes Computer Science Chapter 6 in PDF format for free download. Latest chapter wise notes for CBSE exams.\",\"breadcrumb\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\",\"width\":600,\"height\":300,\"caption\":\"Notes for Computer Fundamentals\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mycbseguide.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CBSE\",\"item\":\"https:\/\/mycbseguide.com\/blog\/category\/cbse\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Class 11\",\"item\":\"https:\/\/mycbseguide.com\/blog\/category\/cbse\/cbse-class-11\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Functions in CPP class 11 Notes Computer Science\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/#website\",\"url\":\"https:\/\/mycbseguide.com\/blog\/\",\"name\":\"myCBSEguide\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mycbseguide.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/#organization\",\"name\":\"myCBSEguide\",\"url\":\"https:\/\/mycbseguide.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mycbseguide.com\/blog\/wp-content\/uploads\/2016\/04\/books_square.png\",\"contentUrl\":\"https:\/\/mycbseguide.com\/blog\/wp-content\/uploads\/2016\/04\/books_square.png\",\"width\":180,\"height\":180,\"caption\":\"myCBSEguide\"},\"image\":{\"@id\":\"https:\/\/mycbseguide.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/mycbseguide\/\",\"https:\/\/x.com\/mycbseguide\",\"https:\/\/www.linkedin.com\/company\/mycbseguide\/\",\"http:\/\/in.pinterest.com\/mycbseguide\/\",\"https:\/\/www.youtube.com\/channel\/UCxuqSnnygFzwJG0pwogCNEQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/mycbseguide.com\/blog\/#\/schema\/person\/f67796d5f5c5a468e8c680aaaad21519\",\"name\":\"myCBSEguide\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Functions in CPP class 11 Notes Computer Science | myCBSEguide","description":"Functions in CPP class 11 Notes Computer Science Chapter 6 in PDF format for free download. Latest chapter wise notes for CBSE exams.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/","og_locale":"en_US","og_type":"article","og_title":"Functions in CPP class 11 Notes Computer Science | myCBSEguide","og_description":"Functions in CPP class 11 Notes Computer Science Chapter 6 in PDF format for free download. Latest chapter wise notes for CBSE exams.","og_url":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/","og_site_name":"myCBSEguide","article_publisher":"https:\/\/www.facebook.com\/mycbseguide\/","article_published_time":"2018-02-15T06:52:11+00:00","article_modified_time":"2018-03-17T09:48:39+00:00","og_image":[{"width":599,"height":242,"url":"https:\/\/mycbseguide.com\/blog\/wp-content\/uploads\/2016\/09\/mycbseguide_n.jpg","type":"image\/jpeg"}],"author":"myCBSEguide","twitter_card":"summary_large_image","twitter_creator":"@mycbseguide","twitter_site":"@mycbseguide","twitter_misc":{"Written by":"myCBSEguide","Est. reading time":"26 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#article","isPartOf":{"@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/"},"author":{"name":"myCBSEguide","@id":"https:\/\/mycbseguide.com\/blog\/#\/schema\/person\/f67796d5f5c5a468e8c680aaaad21519"},"headline":"Functions in CPP class 11 Notes Computer Science","datePublished":"2018-02-15T06:52:11+00:00","dateModified":"2018-03-17T09:48:39+00:00","mainEntityOfPage":{"@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/"},"wordCount":5235,"commentCount":0,"publisher":{"@id":"https:\/\/mycbseguide.com\/blog\/#organization"},"image":{"@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage"},"thumbnailUrl":"","keywords":["CBSE Notes","CBSE Notes and Key Points","Computer Science","Functions in CPP","Quick Revision","Quick Revision Notes"],"articleSection":["Class 11","Revision Notes"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/","url":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/","name":"Functions in CPP class 11 Notes Computer Science | myCBSEguide","isPartOf":{"@id":"https:\/\/mycbseguide.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage"},"image":{"@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage"},"thumbnailUrl":"","datePublished":"2018-02-15T06:52:11+00:00","dateModified":"2018-03-17T09:48:39+00:00","description":"Functions in CPP class 11 Notes Computer Science Chapter 6 in PDF format for free download. Latest chapter wise notes for CBSE exams.","breadcrumb":{"@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#primaryimage","url":"","contentUrl":"","width":600,"height":300,"caption":"Notes for Computer Fundamentals"},{"@type":"BreadcrumbList","@id":"https:\/\/mycbseguide.com\/blog\/functions-cpp-class-11-notes-computer-science\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mycbseguide.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CBSE","item":"https:\/\/mycbseguide.com\/blog\/category\/cbse\/"},{"@type":"ListItem","position":3,"name":"Class 11","item":"https:\/\/mycbseguide.com\/blog\/category\/cbse\/cbse-class-11\/"},{"@type":"ListItem","position":4,"name":"Functions in CPP class 11 Notes Computer Science"}]},{"@type":"WebSite","@id":"https:\/\/mycbseguide.com\/blog\/#website","url":"https:\/\/mycbseguide.com\/blog\/","name":"myCBSEguide","description":"","publisher":{"@id":"https:\/\/mycbseguide.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mycbseguide.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mycbseguide.com\/blog\/#organization","name":"myCBSEguide","url":"https:\/\/mycbseguide.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mycbseguide.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mycbseguide.com\/blog\/wp-content\/uploads\/2016\/04\/books_square.png","contentUrl":"https:\/\/mycbseguide.com\/blog\/wp-content\/uploads\/2016\/04\/books_square.png","width":180,"height":180,"caption":"myCBSEguide"},"image":{"@id":"https:\/\/mycbseguide.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/mycbseguide\/","https:\/\/x.com\/mycbseguide","https:\/\/www.linkedin.com\/company\/mycbseguide\/","http:\/\/in.pinterest.com\/mycbseguide\/","https:\/\/www.youtube.com\/channel\/UCxuqSnnygFzwJG0pwogCNEQ"]},{"@type":"Person","@id":"https:\/\/mycbseguide.com\/blog\/#\/schema\/person\/f67796d5f5c5a468e8c680aaaad21519","name":"myCBSEguide"}]}},"_links":{"self":[{"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/posts\/10035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/comments?post=10035"}],"version-history":[{"count":5,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/posts\/10035\/revisions"}],"predecessor-version":[{"id":11787,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/posts\/10035\/revisions\/11787"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/media\/10009"}],"wp:attachment":[{"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/media?parent=10035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/categories?post=10035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mycbseguide.com\/blog\/wp-json\/wp\/v2\/tags?post=10035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}