Concept
How do you call a function in C?
ComputerScienceOne / Calling Functions
"18.1.4. Calling Functions Once a function has been defined, or at least a prototype has been brought into scope via an #include statement, you can write code to call your function(s). The syntax for doing so is to simply provide the function name followed by parentheses containing values or variables to pass to the function. Some examples: 1 int a = 10, b = 20; 2 int c = sum(a, b); //c contains the value 30 3 4 //invoke a function with literal values: 5 double dist = getDistance(0.0, 0.0, 10.0, 20.0); 6 7 //invoke a function with a combination: 8 double p = 1500.0;"
Related Ideas
- How do you call functions in C?ComputerScienceOne · Organizing Functions
- How are functions defined and declared in modern C?ComputerScienceOne · Declaration: Prototypes
- How do you call a function in PHP?ComputerScienceOne · Calling Functions
- How do you use the C standard mathematics library?ComputerScienceOne · Preprocessor Directives
- What information does a C function prototype specify?ComputerScienceOne · Declaration: Prototypes
- How do functions work in programming languages?ComputerScienceOne · Functions
- How do C functions return values to the calling function?ComputerScienceOne · Void Functions
- How do you invoke functions that accept pointer parameters?ComputerScienceOne · Passing By Reference