C Parameters and Arguments

Beginner
6 min read
Updated: Nov 2026
1 example

What Is Parameters and Arguments?

Parameters are the variables listed in a function definition. Arguments are the values supplied at the call. Each argument is converted to the parameter's type and copied. The number and types must match the prototype.

Remember
double area(double w, double h)   /* w, h are parameters */
{ return w * h; }

area(3, 4);                       /* 3, 4 are arguments  */

Cheat Sheet

Keep these facts handy while you work with Parameters and Arguments in C.

TopicDetail
ParameterName in the definition
ArgumentValue in the call
ConversionArguments convert to parameter types
CountMust match unless variadic

C Examples

Compile each example with gcc file.c -std=c11 -Wall -o out. Next: Return Values.

Example 1 — Integer arguments converted to double

The prototype makes 3 and 4 become 3.0 and 4.0.

C
#include <stdio.h>

double area(double w, double h);

int main(void) {
    printf("area = %.2f\n", area(3, 4));
    printf("area = %.2f\n", area(2.5, 4));
    return 0;
}

double area(double w, double h) {
    return w * h;
}

How It Works

  1. With a prototype in scope, int arguments are converted to double.
  2. Each call gets its own copies of w and h.
  3. 2.5 * 4.0 is 10.0.

Edge Cases & Pitfalls

Check these before relying on Parameters and Arguments in real programs.

count

Wrong argument count

Too few or too many arguments is a compile error when a prototype is visible.

order

Swapped arguments

Same types in the wrong order compile fine. Choose clear names and review calls.

Key Takeaways

  • Parameter: in the definition.
  • Argument: in the call.
  • Copy: each argument is copied.

One line: Parameters are the variables listed in a function definition.

Frequently Asked Questions

A parameter is the named variable in the function definition. An argument is the actual value passed in a call.
No. C does not specify the order in which function arguments are evaluated.
Continue with "C Return Values" next. Send results back with return, including early returns. The C Functions hub lists every topic in order.

Next: Return Values

Send results back with return, including early returns.

Continue →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful