Developer community
+1 vote
102 views
asked by
edited by | 102 views

1 Answer

0 votes
A function is a block of code that has a name and it has a property that it is reusable i.e. it can be executed from as many different points in a C Program as required.

int sum(int x, int y)
{
    int ans = 0;     //holds the answer that will be returned
    ans = x + y;    //calculate the sum
    return ans        //return the answer
}
answered by Advisor (5.6k points) 1 7 14

Related questions

+1 vote
1 answer
+1 vote
2 answers
0 votes
1 answer
asked by carlton Sr Member (4k points) 5 11 21 | 1k views
+1 vote
2 answers
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users