#include <stdlib.h> char *getenv(const char *name) name : 環境変数の名前
#include <stdio.h>
#include <stdlib.h>
int main()
{
int sw;
char *str;
sw = putenv("BAS=c:\\basic");
str = getenv("BAS");
printf("sw %d 環境変数 BAS の値は %s\n", sw, str);
return 0;
}
sw 0 環境変数 BAS の値は c:\basic
| 菅沼ホーム | 本文目次 | 演習問題解答例 | 付録目次 | 索引 |