C Tutorial/stdlib.h/getenv

Материал из C\C++ эксперт
Версия от 10:32, 25 мая 2010; Admin (обсуждение | вклад) (1 версия: Импорт контента...)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

getenv

Item Value Header file stdlib.h Declaration char *getenv(const char *name); Return environmental information by *name.

If a call is made to getenv() with an argument that does not match any of the environment data, a null pointer is returned.


#include <stdlib.h>
#include <stdio.h>
int main(void){
  printf("Path %s",getenv("PATH"));
}