php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sir i cant under stand function and cant apply it in program please help me
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Subject: assignment problem
sir i cant under stand function and cant apply it in program please help me
Reply
#2
Dear student!
Functions are like sub tasks. They receive some information, do some process and provide result. Functions are invoked by calling program. Calling program calls a function by giving it some information and receives the result. This is the basic idea of a function. There are two things related to a function which are declaration and definition. Declaration is the prototype of the function, that includes the return type, name and argument list to the function and definition is the actual function code.

For example, a function is given below

double raiseToPow(double x ,int power)
{
double result;
int i;
result=1.0;
for(i=1;i<=power;i++)
{ result *= x;
}
return(result);
}

This function can not be executed untill we use it in a program. We would have to write program which will use this function.
Please consult lecture 9 for further descritpion. Try sample programs given in the lecture. Your concept will be clarified.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  c++ program on unix varup 0 7,666 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 22,060 05-31-2012, 01:51 AM
Last Post: Vuhelper
  Default Function Argument with example Vuhelper 0 13,426 05-31-2012, 01:47 AM
Last Post: Vuhelper
  What is the difference among calloc function ,malloc function and recalloc function? Vuhelper 0 34,680 05-31-2012, 01:46 AM
Last Post: Vuhelper
  What is Function Overloading in C++ Vuhelper 0 5,490 05-31-2012, 01:45 AM
Last Post: Vuhelper
  offline function in C++ Vuhelper 0 3,729 05-31-2012, 01:42 AM
Last Post: Vuhelper
  i take input from getchar(); function in program in C++ 2012 Vuhelper 0 3,097 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,251 05-31-2012, 01:35 AM
Last Post: Vuhelper
  What are the function of IO ports in C++ Vuhelper 0 3,689 05-31-2012, 01:27 AM
Last Post: Vuhelper
  program Output in C++ 2012 Vuhelper 0 3,058 01-06-2012, 12:28 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support