ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Computer Science & Programming

Types of Function in C Programming Language

Updated on May 20, 2013

C Programming Language

Free C programming tutorials for all beginners.
Free C programming tutorials for all beginners.

In my previous C programming tutorial I tried to explain what function is, its advantages, how you can to declare a C function and call a function in your C program. And I told you that there are five types of functions and they are:

  1. Functions with no arguments and no return values.
  2. Functions with arguments and no return values.
  3. Functions with arguments and return values.
  4. Functions that return multiple values.
  5. Functions with no arguments and return values.

1. Functions with no arguments and no return value.

A C function without any arguments means you cannot pass data (values like int, char etc) to the called function. Similarly, function with no return type does not pass back data to the calling function. It is one of the simplest types of function in C. This type of function which does not return any value cannot be used in an expression it can be used only as independent statement. Let’s have an example to illustrate this.

#include<stdio.h>
#include<conio.h>

void printline()
{
	int i;
	printf("\n");
	for(i=0;i<30;i++)
	{
		printf("-");
	}
	printf("\n");
}

void main()
{
	clrscr();
	printf("Welcome to function in C");
	printline();
	printf("Function easy to learn.");
	printline();
	getch();
}
Logic of the functions with no arguments and no return value.
Logic of the functions with no arguments and no return value.

Output

Output of above program.
Output of above program.

Source Code Explanation:

The above C program example illustrates that how to declare a function with no argument and no return type. I am going to explain only important lines only because this C program example is for those who are above the beginner level.

Line 4-13: This C code block is a user defined function (UDF) whose task is to print a horizontal line. This is a simple function and a basic programmer can understand this. As you can see in line no. 8 I have declared a “for loop” which loops 30 time and prints “-” symbol continuously.

Line 15-23: These line are “main()” function code block. Line no. 18 and 20 simply prints two different messages. And line no. 19 and 21 calls our user defined function “printline()”. You can see output this program below

2. Functions with arguments and no return value.

In our previous example what we have noticed that “main()” function has no control over the UDF “printfline()”, it cannot control its output. Whenever “main()” calls “printline()”, it simply prints line every time. So the result remains the same.

A C function with arguments can perform much better than previous function type. This type of function can accept data from calling function. In other words, you send data to the called function from calling function but you cannot send result data back to the calling function. Rather, it displays the result on the terminal. But we can control the output of function by providing various values as arguments. Let’s have an example to get it better.

#include<stdio.h>
#include<conio.h>

void add(int x, int y)
{
	int result;
	result = x+y;
	printf("Sum of %d and %d is %d.\n\n",x,y,result);
}

void main()
{
	clrscr();
	add(30,15);
	add(63,49);
	add(952,321);
	getch();
}
Logic of the function with arguments and no return value.
Logic of the function with arguments and no return value.

Output

Output of above program.
Output of above program.

Source Code Explanation:

This program simply sends two integer arguments to the UDF “add()” which, further, calculates its sum and stores in another variable and then prints that value. So simple program to understand.

Line 4-9: This C code block is “add()” which accepts two integer type arguments. This UDF also has an integer variable “result” which stores the sum of values passed by calling function (in this example “main()”). And line no. 8 simply prints the result along with argument variable values.

Line 11-18: This code block is a “main()” function but only line no. 14, 15, 16 is important for us now. In these three lines we have called same function “add()” three times but with different values and each function call gives different output. So, you can see, we can control function’s output by providing different integer parameters which was not possible in function type 1. This is the difference between “function with no argument” and “function with argument”.

3. Functions with arguments and return value.

This type of function can send arguments (data) from the calling function to the called function and wait for the result to be returned back from the called function back to the calling function. And this type of function is mostly used in programming world because it can do two way communications; it can accept data as arguments as well as can send back data as return value. The data returned by the function can be used later in our program for further calculations.

#include<stdio.h>
#include<conio.h>

int add(int x, int y)
{
	int result;
	result = x+y;
	return(result);
}

void main()
{
	int z;
	clrscr();

	z = add(952,321);
	printf("Result %d.\n\n",add(30,55));
	printf("Result %d.\n\n",z);

	getch();
}
Logic of the function with arguments and return value.
Logic of the function with arguments and return value.
Output of the above program.
Output of the above program.

Source Code Explanation:

This program sends two integer values (x and y) to the UDF “add()”, “add()” function adds these two values and sends back the result to the calling function (in this program to “main()” function). Later result is printed on the terminal.

Line No. 4-9: Look line no. 4 carefully, it starts with int. This int is the return type of the function, means it can only return integer type data to the calling function. If you want any function to return character values then you must change this to char type. In line no. 8 you can see return statement, return is a keyword and in bracket we can give values which we want to return. You can assign any integer value to experiment with this return which ultimately will change its output. Do experiment with all you program and don’t hesitate.

Line No. 11-21: In this code block only line no. 16, 17 and 18 is important. We have declared an integer “z” which we used in line no. 16. Why we are using integer variable “z” here? You know that our UDF “add()” returns an integer value on calling. To store that value we have declared an integer value. We have passed 952, 321 to the “add()” function, which finally return 1273 as result. This value will be stored in “z” integer variable. Now we can use “z” to print its value or to other function.

You will also notice some strange statement in line no. 17. Actually line no. 17 and 18 does the same job, in line no. 18 we have used an extra variable whereas on line no. 17 we directly printed the value without using any extra variable. This was simply to show you how we can use function in different ways.

4. Functions with no arguments but returns value.

We may need a function which does not take any argument but only returns values to the calling function then this type of function is useful. The best example of this type of function is “getchar()” library function which is declared in the header file “stdio.h”. We can declare a similar library function of own. Take a look.

#include<stdio.h>
#include<conio.h>

int send()
{
	int no1;
	printf("Enter a no : ");
	scanf("%d",&no1);
	return(no1);
}

void main()
{
	int z;
	clrscr();
	z = send();
	printf("\nYou entered : %d.", z);
	getch();
}

Functions with no arguments and return values.

Output of the above program.
Output of the above program.

Source Code Explanation:

In this program we have a UDF which takes one integer as input from keyboard and sends back to the calling function. This is a very easy code to understand if you have followed all above code explanation. So I am not going to explain this code. But if you find difficulty please post your problem and I will solve that.

5. Functions that return multiple values.

So far, we have learned and seen that in a function, return statement was able to return only single value. That is because; a return statement can return only one value. But if we want to send back more than one value then how we could do this?

We have used arguments to send values to the called function, in the same way we can also use arguments to send back information to the calling function. The arguments that are used to send back data are called Output Parameters.

It is a bit difficult for novice because this type of function uses pointer. Let’s see an example:

#include<stdio.h>
#include<conio.h>

void calc(int x, int y, int *add, int *sub)
{
	*add = x+y;
	*sub = x-y;
}

void main()
{
	int a=20, b=11, p,q;
	clrscr();
	calc(a,b,&p,&q);
	printf("Sum = %d, Sub = %d",p,q);
	getch();
}
Output of the above program.
Output of the above program.

Source Code Explanation:

Logic of this program is that we call UDF “calc()” and sends argument then it adds and subtract that two values and store that values in their respective pointers. The “*” is known as indirection operator whereas “&” known as address operator. We can get memory address of any variable by simply placing “&” before variable name. In the same way we get value stored at specific memory location by using “*” just before memory address. These things are a bit confusing but when you will understand pointer then these thing will become clearer.

Line no. 4-8: This UDF function is different from all above UDF because it implements pointer. I know line no. 4 looks something strange, let’s have a clear idea of it. “Calc()” function has four arguments, first two arguments need no explanation. Last two arguments are integer pointer which works as output parameters (arguments). Pointer can only store address of the value rather than value but when we add * to pointer variable then we can store value at that address.

Line no. 10-17: When we call function “calc()” in the line no. 14 then following assignments occurs. Value of variable “a” is assigned to “x”, value of variable “b” is assigned to “y”, address of “p” and “q” to “add” and “sub” respectively. In line no. 6 and 7 we are adding and subtracting values and storing the result at their respective memory location. This is how the program works.

I tried to put things in simple for beginner but if you find it difficult to understand then please let me know through comments and I will try to change that part as soon as possible.

Help me to write better.

Did this help you?

See results

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      latha 7 years ago

      You clearly explained about function calls. Thanks a lot. if possible Please post topics on data structures in c also.

    • profile image

      cheryl 7 years ago

      please give more example

    • profile image

      narasimha 7 years ago

      i got the required information.thank u

    • profile image

      Guri 7 years ago

      I really very happy when i see most of us information was there

      thanks

    • profile image

      Vaibhav P 7 years ago

      really explained each and every type clearly thanks a lot it was really very useful

    • profile image

      ANA 7 years ago

      i get satisfactory information, which i want. really thanks.

    • profile image

      bromanz 7 years ago

      thnx man you really help me

    • profile image

      garvit 7 years ago

      grt work man..........

    • profile image

      monika 7 years ago

      excellent way to give a propre defintions on c language associated functions

    • profile image

      minakshi 7 years ago

      great..........

    • profile image

      padmavathy s 7 years ago

      give example for multiple values with out using pointer variable

    • techno geek profile image

      techno geek 7 years ago from calafornia

      hi really nice hub.............do u have source code for parser..............

    • profile image

      Deepa 7 years ago

      hey!!! really awesome explanation..i was confused about functions before entering in to this site..thanks a lot..

    • profile image

      Jeff AmA 7 years ago

      got the right staff sport on. Kudos

    • profile image

      dhanam 7 years ago

      what an excellent explanation....its very useful to improve my knowledge.....thank u boss

    • profile image

      jopy 7 years ago

      thankzx a lot

    • profile image

      sluxtpr 7 years ago

      really super explanation

    • save my system profile image

      save my system 7 years ago from United Kingdom - London

      Hey you explain very clearly and effectively about function. Function keeps main importance in C language. I simplifies program a lot.

    • Manna in the wild profile image

      Manna in the wild 7 years ago from Australia

      C rocks. Just got to keep those pointers under control!

    • profile image

      DANYAL(PAKI) 7 years ago

      GREAT JOB....KEEP IT UP...

    • profile image

      bharani 7 years ago

      it is very easy to understand informations abouy c thnx a lot

    • profile image

      kashif  7 years ago

      easy to understand

    • profile image

      kim magtoto 7 years ago

      nice

    • profile image

      chin 7 years ago

      wow.. its so easy to understand.. how to program :)

    • profile image

      chandan 7 years ago

      very good

    • profile image

      neeraja 6 years ago

      It is very useful to us.Thank you very much

    • profile image

      marky 6 years ago

      does the gantt chart exist in this language?

    • profile image

      nbbatt.com 6 years ago from bear, de, 19701

      Thanks for your explanation. it helps me to understand it.

    • profile image

      saurabh 6 years ago

      btr dn a text book :)

    • profile image

      shobin 6 years ago

      thanks

    • profile image

      Swarnalata 6 years ago

      Functions are explained clearly and with simple examples.

      It helps in better understanding. Thanks.

    • profile image

      negative 6 years ago

      can u give more examples???

    • profile image

      Ranjani 6 years ago

      Thanks for clear explanation

    • profile image

      annapoorani ct 6 years ago

      thanks for ur clear explanation

    • profile image

      syed abthahir 6 years ago

      please,clear explanation in functions of c program

    • profile image

      Anil 6 years ago

      thank u i got the information

    • profile image

      joseph 6 years ago

      my problem is using switch functions, im counting the days between the entering the first month and last month

      example

      suppose im enter 2 in the first month

      and 5 for the last month the solution must be

      28+31+30+31+30

      the output must be 120 and asking again the program if he/her try again

    • profile image

      anita kapil 6 years ago

      iam totally confused

    • profile image

      shree 6 years ago

      example programs and explanation was very clear and easy to understand

    • profile image

      SkyKing 6 years ago

      well done.. thanks a lot.. finally, I can answer my homework! ^^

    • profile image

      Princess 6 years ago

      I really dont understand the function

    • profile image

      shobin 6 years ago

      In Fn. with arguments and no return type,how we take run time entries.

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 6 years ago from Bangalore, Karnataka, INDIA

      @shobin i think u want to take input from user, if so then u can use scanf within function as u do in main().

    • profile image

      gourav 6 years ago

      thanks dude

    • profile image

      shobin 6 years ago

      if we use scanf in function then it is fn.with arguments.

    • profile image

      shobin 6 years ago

      please explain this clearly;

    • profile image

      shobin 6 years ago

      #include

      #include

      void add(int x, int y)

      {

      int result;

      result = x+y;

      printf("Sum of %d and %d is %d.\n\n",x,y,result);

      }

      void main()

      {

      clrscr();

      add(30,15);

      add(63,49);

      add(952,321);

      getch();

      }

      sir,please tell this is right or wrong.

    • profile image

      shobin 6 years ago

      void add(int b,int c)

      {

      int a;

      a=b+c;

      cout

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 6 years ago from Bangalore, Karnataka, INDIA

      @shobin : when we declare function in following manner like "void add(int x, int y)" then "int x & int y" are parameter or arguments of "add" function. So, code inside function (like printf, scanf, for loop etc.) is not an arguments.

    • profile image

      anamika 6 years ago

      can u give more example

    • profile image

      karthik 6 years ago

      plz tell how can we get logics in c programs sir . plz explain me once plz

    • profile image

      musty 6 years ago

      You are too good... keep it up.

    • profile image

      arun 6 years ago

      thanks

    • profile image

      musty 6 years ago

      hi raj,

      after going through your function calls i decided to try it on my prog but its giving me error. Can u help out.

      thanks.

      #include

      using namespace std;

      char password(char pass)

      {

      pass='\0';

      while (pass!='a')

      {

      cout

    • profile image

      SNT 6 years ago

      THANK YOU THIS HELPED ME A LOT

    • profile image

      mark ted clavano bediones 6 years ago

      can you please try to give an example of c programing in functions and structure of program

    • profile image

      sowmya 6 years ago

      really very helpful

    • profile image

      rajesh patel 6 years ago

      very very usefull

    • profile image

      Sid 6 years ago

      What are such types of functions called?

      the info was helpful.

    • profile image

      poonam894 6 years ago

      this information helps me a a lot....thnx..

    • profile image

      deepika 6 years ago

      thanks..........u have given a wonderful explaination about function.

    • profile image

      James 6 years ago

      Sir, could you help me about this program that calculate the distance between two points using the 3 functions. the scond function will calculate the distance bet x and y. the return values should be of type double. and the main fucntion will just call those functions that you've created. so here is the sample run:

      enter two num : 1.2 1

      you entered :1.2 and 1

      distance between the two of them : 2

      i almost forgot of how to program and this is the program that i've seen in my old notes before. kindly help me to solve this sample prog for me to refresh my ideas about programmings. thanks and more power\.

      hear you soon...

    • profile image

      brundha 6 years ago

      ya its fine but give me some real exampels

    • profile image

      jatinder 6 years ago

      kaka kamal kar diti

    • profile image

      saran 6 years ago

      really super

    • profile image

      sneha 6 years ago

      i got great satisfaction after reading dis contents

    • Mousumi Paul profile image

      Mousumi Paul 6 years ago

      Good Hub

    • profile image

      Ambily 6 years ago

      you are right sneha...

    • profile image

      madiha 6 years ago

      i m totally confused so plz explain clearly

    • profile image

      hemant 6 years ago

      thanks

    • profile image

      ^^ 6 years ago

      help me out try a flames

    • profile image

      ANU 6 years ago

      I HAVE UNDERSTOOD IT CLEARLY.I LEARNT A NEW THING FROM IT.

    • profile image

      keerthi k.p 6 years ago

      its nice

    • profile image

      bebz 6 years ago

      can i ask What are the two types of Function in C?

    • profile image

      C.SUHANA AMBRIN 6 years ago

      thank u i got some clarification regarding this

    • profile image

      sharan 6 years ago

      what a explanation!!!!!!!!!!good.......i understand clearly.....Thank u soooooo much.........

    • profile image

      mini 6 years ago

      very good explanation.........thanx alot for such a clear expalnation......

    • profile image

      Ruchika  6 years ago

      Its the best explaination for the userdefined functions.

      Thanx

    • profile image

      NED 6 years ago

      thanx dear;;;;;;;;;;;;;

    • profile image

      tahir khan 6 years ago

      thanks for giving detailed information

    • profile image

      chandan kumar 6 years ago

      more explain more understanding level.

      more perfect

    • profile image

      poonam 6 years ago

      very good code.simple and easy.keep going

    • profile image

      abracadabra 5 years ago

      this is simple function u have explained. so pls be ellaborate so that everyone can properly understand of function from a to z.

    • profile image

      swetha 5 years ago

      thnx a lot it really helped in my college project thnq sooooooooooo much.

    • profile image

      priyaa 5 years ago

      its useful yaar...

    • profile image

      SWEETY 5 years ago

      ITS EASY

    • profile image

      Amilton 5 years ago

      Thanks a lot, it's really helpful

    • profile image

      mohan krishna 5 years ago

      very very nice

    • profile image

      pratik vaishya 5 years ago

      The Explanation given for functions is really good & easy to understand also. Thanks for giving so good explanation about functions

    • profile image

      vishnu 5 years ago

      give more examples

    • profile image

      pradeep mishra 5 years ago

      that's very best explanation in "c" language

    • profile image

      urmila pilania 5 years ago

      good explanation.really helpful. thanks

    • profile image

      jessi 5 years ago

      kevvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

    • profile image

      ali rizviiii 5 years ago

      awosome work broo,,,,,,,

    • profile image

      suresh 5 years ago

      great job...... thanks alot...... now c became easy to me....

    • profile image

      Joseph Kate Sobrio 5 years ago

      tnx...

    • profile image

      junangao 5 years ago

      Exercise#1 semi-finals

      1)(Prime numbers)An integer is said to be prime it is divisible by only 1 and by itself.For example 2,3,5 & 7 are prime, but 4,6,8 & 9 are not.

      a)Write a function that determines whether a number is prime.

      b)Use the function in a program that determines all the prime numbers between 1 to 1000.Store all the results in an array and print them(in a neat table format).

      2) (Bubble sort)in the bubble sort algorithm, smaller values gradually"bubble" their way to the top of the array like air bubbles rising in water, while the larger values sink to the bottom. The bubbles sort makes several passes through the array.On each pass, successive pairs of elements are compared. If a pair is increasing order ( or the values are identical), we leave the values as they are. If a pair in decreasing order, their values are swapped in the array.

      While a program that sorts an array of 10 integers using bubble sort. Use the rand function to generate the 10 integers. Display the integers before and after applying the bubble sort. Sample display is;

      3 1

      2 2

      1 3

      7 4

      5 5

      6 6

      4 7

      10 8

      9 9

      8 10

      3)Write a program that uses random number generation to create sentences.The program should use four arrays of pointers to char called article, noun, verb, & preposition. The program should create a sentence by selecting a word at random from each array in the following order:article, noun, verb, preposition, article & noun.

      As each word is picked, it should be concatenated to the previous words in an array that is large enough to hold the entire sentence. The words should be separated by spaces, when the final sentence is output, it should start with the capital letter & end with a period.

      The arrays should be filled as follows:the article array should contain the articles "the" "a","one","some" & "any" the noun array should contain the nouns "boy","girl","dog","town" & "car" the verb array should contain the verbs "drove","jumped","rain","walked"&"skipped" the preposition array should contain the preposition "to,"form","over","under" & "on".

      After completing the program, modify it to produce a short consisting of several of these sentences.Each paragraph should consist of 5 sentences Use a random generator to display 3 to 5 paragraph.Use array of pointers to char for the paragraphs as well...

      Thanks so much...

      take care always....

    • profile image

      Ali 5 years ago

      I loved Functions that return multiple values. I read it few other places but this was the best and easiest. Thank you.

    • profile image

      TARUN 5 years ago

      I GOT VERY MUCH HELP FROM THIS

      THANXXXXXXXXXXXXXXXX................

    • profile image

      sheena 5 years ago

      hi?

      can you help me out of my excercises ?

      i get so .. gggrr !

      tnx .. mhuaah

      plssss ..

    • profile image

      caglar betos 5 years ago

      there is an example, Structure of a program

      // my first program in C++

      This is a comment line. All lines beginning with two slash signs (//) are considered comments and do not have any effect on the behavior of the program. The programmer can use them to include short explanations or observations within the source code itself. In this case, the line is a brief description of what our program is.

      #include

      Lines beginning with a hash sign (#) are directives for the preprocessor. They are not regular code lines with expressions but indications for the compiler's preprocessor. In this case the directive #include tells the preprocessor to include the iostream standard file. This specific file (iostream) includes the declarations of the basic standard input-output library in C++, and it is included because its functionality is going to be used later in the program.

      using namespace std;

      All the elements of the standard C++ library are declared within what is called a namespace, the namespace with the name std. So in order to access its functionality we declare with this expression that we will be using these entities. This line is very frequent in C++ programs that use the standard library, and in fact it will be included in most of the source codes included in these tutorials.

      int main ()

      This line corresponds to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether there are other functions with other names defined before or after it - the instructions contained within this function's definition will always be the first ones to be executed in any C++ program. For that same reason, it is essential that all C++ programs have a main function.

      The word main is followed in the code by a pair of parentheses (()). That is because it is a function declaration: In C++, what differentiates a function declaration from other types of expressions are these parentheses that follow its name. Optionally, these parentheses may enclose a list of parameters within them.

      Right after these parentheses we can find the body of the main function enclosed in braces ({}). What is contained within these braces is what the function does when it is executed.

      cout

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 5 years ago from Bangalore, Karnataka, INDIA

      @sheena, i will help you, you can contact me for any help..

    • profile image

      keerthi.M 5 years ago

      U have clearly explained about the categoreis of functions.

      Thank u very much.....

    • profile image

      ash 5 years ago

      How to write down a funtion definition :

      A function called bilbo accepts a character and returns an integer value ?

      a function called frodo which accepts two integer values and returns a character

      a function called gamcho which accepts three characters and returns a long integer

      a function called memo accepts a long integer and returns a short integer

      a function called poloko accepts two double precision quantities and return nothing

      Can anyone help me to solve this ?

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 5 years ago from Bangalore, Karnataka, INDIA

      @ash : those function will have any logic or just prototype (structure) for whatever you are saying?

    • profile image

      suman.srestha 5 years ago

      can u the solution to find out prime no using function?

    • profile image

      Indhu 5 years ago

      It very use full.

    • profile image

      bunty 5 years ago

      u have not use pointer while passing argument how they will send

    • profile image

      Rahul S 5 years ago

      I got a function definition something like

      sum (a,b)

      int a, b

      {

      int sum;

      sum=a+b;

      }

      It is working...but i don't know how..??plz describe this...

    • profile image

      tarun gandhi 5 years ago

      thanks

    • profile image

      shekhar 5 years ago

      thanks for providing beautifull and helpful notes

    • profile image

      nico 5 years ago

      programming is good.

    • profile image

      uma 5 years ago

      super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super

    • profile image

      senthil 5 years ago

      super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super supersuper super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super supersuper super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super

      super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super supersuper super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super super

    • profile image

      gg 5 years ago

      super

    • profile image

      ashvin vd 5 years ago

      u r jst awesome yaaaaaarrrrrrrrrr'

      thnx......... see u soon

    • profile image

      yogitha 5 years ago

      nice explanation got an idea about functions but want some more examples

    • profile image

      C Teacher 5 years ago

      You are given a very nice job

    • profile image

      sanga 5 years ago

      in c language main is which function

    • profile image

      mohan 5 years ago

      your explanation is good,but you doesn't specify about function prototype and function definition if u explain them in a good way with few examples your notes will be excellent try to improve it.

    • profile image

      Abdullah 5 years ago

      CAN u Tell Me the BasIc book 4 the Guidance of c language????

    • profile image

      santosh mca 5 years ago

      types of user defined functions explanation is superb. given information is easily understood by the begeners also

    • razaatc profile image

      razaatc 5 years ago from lahore

      i am clearewd sbout the functions right now thank u sir very much

    • profile image

      Dr. Debugger 5 years ago

      Great Explanation, can't go simple than this

    • profile image

      ameer ali khoso 5 years ago

      gud work

    • profile image

      $onam 5 years ago

      Best explanation for knowing concept....ThanX

    • profile image

      jk patel 5 years ago

      yupiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

      thnx

    • profile image

      mmmmm 5 years ago

      thank you

    • profile image

      jay 5 years ago

      Wow it is easy to understand but for better understand i need more example

    • profile image

      sandeep 5 years ago

      totally awesome.

    • profile image

      sound 5 years ago

      .......................................................................................................nice hub

    • profile image

      vivek 5 years ago

      Thanks A lot friend really very Helpful website.

    • profile image

      deepak kumar bansal 5 years ago

      what is the basic difference in the functions which one return a value and second which not return any value ...

      but give the same result like

      void add1()

      {

      int a=4+5;

      }

      int add2()

      { int a=4+5;

      return a;

      }

      both add1 and add2 both return same result than what is use of return type????

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 5 years ago from Bangalore, Karnataka, INDIA

      @deepak : how you will retrieve result of add1 in main function?

    • profile image

      sangobingo 5 years ago

      I've never seen such a detailed explanation anywhere.its really a fantastic job done by you to help us understanding the functions concept in c! Thanks! keep it up!

    • profile image

      Pramod 5 years ago

      sir, your notes is very helpful to us

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 5 years ago from Bangalore, Karnataka, INDIA

      Thanks @sangobingo...

    • profile image

      Anonymous Programmer 5 years ago

      Thank You

      ``

    • profile image

      sonam 5 years ago

      sir

      ur notes is good..........

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 5 years ago from Bangalore, Karnataka, INDIA

      thanks @Sonam

    • profile image

      vam 5 years ago

      need some more examples mr.kishor

    • profile image

      Himanshu Bakshi 4 years ago

      Raj Kishore, I am very greatful to you. You did really amazing job. High Recommend Sir...

    • profile image

      sayeed khan 4 years ago

      it is the vary good explation..........

    • profile image

      Dhaval 4 years ago

      How can i set the username or password in C

    • profile image

      deep 4 years ago

      thanks buddy.......its really good

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 4 years ago from Bangalore, Karnataka, INDIA

      deep: thanks..... :)

    • profile image

      priya 4 years ago

      It is really useful page for students

    • profile image

      munees 4 years ago

      very super supersupervsupersupersupersupersuper super supersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersuper

    • profile image

      Kalaiselvam N 4 years ago

      nice....easily understandable from diagram itself

    • rajkishor09 profile image
      Author

      RAJKISHOR SAHU 4 years ago from Bangalore, Karnataka, INDIA

      thank you guys......

    • profile image

      nandini 4 years ago

      nice i can understand clearly

    • profile image

      vipul 4 years ago

      thanks boss

    • profile image

      jani 4 years ago

      really helpful thank you !!

    • Vishal Narayanan profile image

      Vishal Narayanan 4 years ago from Hosur, Karnataka, India

      sir really u are great . i understood clear cut. it was perfect hats off. really cant go simple than this .

    • profile image

      saam 3 years ago

      thanks.................................................................................................a lot

    • profile image

      raj 3 years ago

      its very useful for me.

    • profile image

      Julian 3 years ago

      Thank you for most informative acticle. What I would like to see is an article that describe all of the built-in library fuction that come with C or C++. I would like each function in the same format as a very antiquated programming language - DBASE VI.

    • profile image

      john 2 years ago

      awsome

    • profile image

      umeee 22 months ago

      C stands for what in c language.....?any body....

    • profile image

      RVK 20 months ago

      THNXZZZZZ

    • profile image

      m iftekhar ul haque 19 months ago

      really helpful thank you !!

    • profile image

      Pooja 17 months ago

      Sir your notes is very useful

    • profile image

      AP.PRAKASH.(SOFTWARE ENGINEER) 3 months ago

      THIS C PROGRAMMING IS AVERY USEFUL IS A IMPROVEMENT SOFTWARE IMPROVEMENT

    Click to Rate This Article