473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

prototype header

please help me!
i need a prototype header for function that finds the sum of two numbers.
int sum ( int);
is this correct?

--------------------------------------------------------------------------------
Feb 15 '07 #1
3 1572
sicarie
4,677 Expert Mod 4TB
please help me!
i need a prototype header for function that finds the sum of two numbers.
int sum ( int);
is this correct?

--------------------------------------------------------------------------------
int sum(int);

The first part is the return type, so you are going to return an integer, and the part in the parenthesis is the variable you are passing to the function, so it can perform some action on it to return that integer.

You still need one more int. With what's above, can you figure out where?
Feb 15 '07 #2
int sum(int,int);
now is this correct?
Feb 15 '07 #3
sicarie
4,677 Expert Mod 4TB
int sum(int,int);
now is this correct?
Yep, you got it.
Feb 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Mantorok Redgormor | last post by:
Would this by any chance invoke undefined behavior? extern int printf(const char *, ...); int main(void) { printf("Hello\n"); return 0; } That is, providing my own printf prototype would...
21
by: Rob Somers | last post by:
Hey people, I read a good thread on here regarding the reason why we use function prototypes, and it answered most of my questions, but I wanted to double check on a couple of things, as I am...
21
by: Doug Lerner | last post by:
I'm working on a client/server app that seems to work fine in OS Firefox and Windows IE and Firefox. However, in OS X Safari, although the UI/communications themselves work fine, if the...
31
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked...
2
by: Bill Davidson | last post by:
All: I recently had to include a common header file into a straight C (.c file). This header file contains a function prototype that has a default argument. For example int MyFunc(int MyArg =...
7
by: Robert Latest | last post by:
Hello, generally I stick with C89, but C99 is useful at times, such as the snprintf() function. To use that function within an otherwise C89-conforming program, I just put the proper...
3
by: June Lee | last post by:
Is that for Class/Object function prototype, I must define the function in header file or .cpp file. MyClass::functionA(); MyClass::functionB(); but for C function prototype, I don't have to...
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
4
by: vshenoy | last post by:
Hi Guys, I was going through gdbm-1.8.3 source (http://ftp.gnu.org/gnu/gdbm/ gdbm-1.8.3.tar.gz) and found this strange thing : all the exposed functions of gdbm work with GDBM_FILE pointer...
8
by: benn | last post by:
Here's the setup... Defines.h file contains: enum DAY { monday, tueday }; DayFunctions.h contains prototype: void printIsMonday ( enum DAY currentDay); DayFunctions.c contains:
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.