---
id: c-functions-parameters
title: "C Function Parameters"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["parameters vs arguments", "return values", "C 함수 매개변수"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.87
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["c", "programming-language", "w3schools", "functions", "parameters", "return-values"]
raw_sources: ["https://www.w3schools.com/c/c_functions_parameters.php"]
applied_in: []
github_commit: ""
---

# [[C Function Parameters]]

## 🎯 한 줄 통찰 (One-line insight)
Passing an array to a function only requires the ARRAY NAME at the call site (`myFunction(myNumbers)`), but the function's own parameter declaration must still spell out the full array type (`int myNumbers[5]`) — an asymmetry that follows directly from the earlier Pointers-and-Arrays insight that an array name is already a pointer to its first element, so the "argument" being passed really is just that one address, while the parameter declaration exists purely to tell the function how to interpret what's at that address. [S1]

## 🧠 핵심 개념 (Core concepts)
- **Parameter vs. argument** — a parameter is the variable name INSIDE the function signature; an argument is the actual value passed at the CALL site (e.g. `name` is the parameter, `"Liam"` is the argument). [S1]
- **Multiple parameters** — comma-separated in the signature; the call must supply the SAME NUMBER of arguments, IN THE SAME ORDER. [S1]
- **Passing arrays** — call site uses just the array name; the function signature still needs the full array declaration (`int myNumbers[5]`). [S1]
- **Return values via a real return type** — replacing `void` with a type (e.g. `int`) plus a `return` statement lets the function hand back a computed value instead of just performing an action. [S1]
- **Storing results in arrays** — when many result variables would otherwise be needed, storing each function call's result into an array element keeps the code manageable. [S1]

## 📖 세부 내용 (Details)
- Single string parameter reused across calls: `void myFunction(char name[]) { printf("Hello %s\n", name); } myFunction("Liam"); myFunction("Jenny");`. [S1]
- Passing an array (name-only at call site, full type in signature): `void myFunction(int myNumbers[5]) { for (int i = 0; i < 5; i++) { printf("%d\n", myNumbers[i]); } } int myNumbers[5] = {10,20,30,40,50}; myFunction(myNumbers);`. [S1]
- Returning a value instead of void: `int myFunction(int x, int y) { return x + y; } int result = myFunction(5, 3); // 8`. [S1]
- Storing multiple call results into an array: `resultArr[0] = calculateSum(5, 3); resultArr[1] = calculateSum(8, 2); ...`. [S1]
- Real-life Fahrenheit-to-Celsius conversion: `float toCelsius(float fahrenheit) { return (5.0 / 9.0) * (fahrenheit - 32.0); }`. [S1]

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
- **인자 개수와 순서는 반드시 일치해야 함**: 여러 매개변수를 사용할 때 함수 호출의 인자 개수가 매개변수 개수와 같아야 하고 순서도 동일해야 한다는 점이 명시적으로 강조됨. [S1]

## 🛠️ 적용 사례 (Applied in summary)
화씨를 섭씨로 변환하는 toCelsius() 함수가 원문에서 직접 실전 활용 사례로 제시됨. [S1]

## 💻 코드 패턴 (Code patterns)
A real-life function converting Fahrenheit to Celsius, returning a computed value (C):
```c
float toCelsius(float fahrenheit) {
  return (5.0 / 9.0) * (fahrenheit - 32.0);
}
int main() {
  float f_value = 98.8;
  float result = toCelsius(f_value);
  printf("Convert Fahrenheit to Celsius: %.2f\n", result);
  return 0;
}
```

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.87
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[C Tutorial]]
- **관련 개념:** [[C Functions Decl]], [[C Pointers Arrays]], [[C Functions Recursion]]
- **참조 맥락:** 함수 매개변수와 반환값 — 재귀(Functions Recursion) 챕터로 이어짐.

## 📚 출처 (Sources)
- [S1] W3Schools — C Function Parameters — https://www.w3schools.com/c/c_functions_parameters.php

## 📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "C Function Parameters" page (Astra wiki-curation, P-Reinforce v3.1 format).
