answersLogoWhite

0

C does not support function overloading. Every function in the global namespace must have a unique name. However, to find the sum of n numbers, place the numbers in an array of appropriate size and pass the array to the following function:

// Sum an array of n values

int sum (int values[], unsigned n) {

int result = 0;

for (int i=0; i<size; ++i) result += values[i];

return result;

}

User Avatar

Wiki User

7y ago

What else can I help you with?

Related Questions

How do you write a program in C using the fprint and fscan functions?

By using those two functions in your code.


What is the importance of using functions in a c program?

C programs do not function without functions.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


What is the importance of functions in a c plus plus program?

Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.


What is up-loading and down-loading using an ftp site?

popup loading


Write C program using functions to simulate a Calculator with the basic functions - square root and reciprocal?

trytytytytytytytytrf 6 bcvvtgujhy6


What is the use of function in c?

using function we can call the function in the program any where. by using functions we can reduce the code redundancy


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Why we write java program using classes?

Classes are well organised functions in java which help discriminate between two different functions.


What is a program for finding sqareroot of a number without using functions?

you read the book how to solve by dromy.


Where is the best place for you to find information about the features and functions of a program you are using?

the appilcation's help menu