![]() ![]() ![]() | functions/functions-input-1-a.c - Samme som ovenfor - sammenfaldende navnet af formelle og aktuelle parametre - intet ændret. | Lektion 6 - slide 8 : 21 Program 2 |
#include <stdio.h> /* Input: The same as the previous program. The formal and actual parameters have the same names. */ void f(int i, int j){ printf("i + i = %d + %d = %d\n", i, j, i + j); } int main(void) { int i = 3, j = 4; f(i, j); printf("i + j = %d + %d = %d\n", i, j, i + j); return 0; }