Document of c-modernization-kit (calc) 1.0.0
Loading...
Searching...
No Matches
add.c File Reference

add 関数の呼び出しコマンド。 More...

#include <libcalcbase.h>
#include <console-util.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for add.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 プログラムのエントリーポイント。

Detailed Description

add 関数の呼び出しコマンド。

Author
c-modenization-kit sample team
Date
2025/11/22
Version
1.0.0

コマンドライン引数から 2 つの整数を受け取り、add 関数を使用して 加算結果を標準出力に出力します。

Definition in file add.c.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

プログラムのエントリーポイント。

Parameters
[in]argcコマンドライン引数の数。
[in]argvコマンドライン引数の配列。
Returns
成功時は 0、失敗時は 0 以外の値を返します。

使用例:

./add 10 20
// 出力: 30
int add(const int a, const int b, int *result)
2 つの整数を加算します。
Definition add.c:20
Attention
引数は正確に 2 つ必要です。

Definition at line 40 of file add.c.

References add().

Here is the call graph for this function: