Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function (Retrun push)for what purpose use in the program. ?
#1
The functions are like sub-tasks. They receive some information, do some process and provide a result. Functions are invoked through a calling program. Calling program does not need to know what the function is doing and how it is performing its task. There is a specific function-calling methodology. The calling program calls a function by giving it some information and receives the result.

We have a main ( ) in every C program. ‘main ( )’ is also a function. When we write a function, it must start with a name and surrounding braces just like with main ( ). Functions are very important in code reusing.

There are two categories of functions:

1. Functions that return a value
2. Functions that do not return a value

Suppose, we have a function that calculates the square of an integer such that function will return the square of the integer. Similarly we may have a function which displays some information on the screen so this function is not supposed to return any value to the calling program.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  c++ program on unix varup 0 7,588 10-10-2012, 06:16 PM
Last Post: varup
  why we use inline function if there are simple function available, or what is the spa Vuhelper 0 21,987 05-31-2012, 01:51 AM
Last Post: Vuhelper
  Default Function Argument with example Vuhelper 0 13,342 05-31-2012, 01:47 AM
Last Post: Vuhelper
  What is the difference among calloc function ,malloc function and recalloc function? Vuhelper 0 34,600 05-31-2012, 01:46 AM
Last Post: Vuhelper
  What is Function Overloading in C++ Vuhelper 0 5,409 05-31-2012, 01:45 AM
Last Post: Vuhelper
  offline function in C++ Vuhelper 0 3,637 05-31-2012, 01:42 AM
Last Post: Vuhelper
  i take input from getchar(); function in program in C++ 2012 Vuhelper 0 3,001 05-31-2012, 01:40 AM
Last Post: Vuhelper
  how we used the 1-calloc Function 2- malloc Function 3- free () 4- realloc Function i Vuhelper 1 31,146 05-31-2012, 01:35 AM
Last Post: Vuhelper
  when we push F1 key to step into a subroutine? Vuhelper 0 4,440 05-31-2012, 01:33 AM
Last Post: Vuhelper
  What are the function of IO ports in C++ Vuhelper 0 3,607 05-31-2012, 01:27 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)