Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
  • Please log in to reply
No replies to this topic

#1 enggdrcaos

enggdrcaos

    CC Lurker

  • New Member
  • Pip
  • 8 posts
  • Programming Language:C, Java, C++, Objective-C

Posted 01 October 2012 - 06:08 AM

In this tutorial we have explained one of the features which is available in both C/C++ know as functions

This tutorial explains the following:

1.What are functions?
2.Definition of functions.
3.Call a functions.
4.Passing Parameters.
5.Arguments.

A brief simple tutorial can be found here:

http://www.youtube.com/watch?v=hPmQlX9mKCc

Example used in video:

#include <iostream>
#include<stdio.h>
using namespace std;
int sqr(int x);
int main()
{
int y=10;
cout<<sqr(y);

}
int sqr(int x)
{
x=x*x;
}

  • 0





Also tagged with one or more of these keywords: functions, c++ functions, c functions, declaring functions, parameters of functions, arguments of functions, define function, call function, no code repeat

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download