/*
*@author cody
*@date 2014-08-12
*@description
*/ /*
extern char **environ //environment values #include <stdlib.h>
char *getenv(const char *name);
int setenv(const char *name,const char *value,int rewrite); // set enviroment if exists rewrite - 0 do not rewrite not 0 rewrite
void unsetenv(const char *name); //delete env by name
*/ #include <stdio.h>
#include <stdlib.h> void environment(){
extern char **environ;
int i;
for(i = ;environ[i] != NULL;i ++){
printf("%s\n",environ[i] );
}
} void getPath(){ char *path = getenv("PATH");
printf("PATH = %s\n",path ); setenv("PATH","HELLO",);
path = getenv("PATH");
printf("PATH = %s\n",path ); } int main(int argc, char const *argv[])
{ //environment();
getPath();
return ;
}

最新文章

  1. UE4新手引导入门教程
  2. springMVC--@requestBody
  3. VirtualBox piix4_smbus Error
  4. c语言程序
  5. 我的面经(ing)
  6. dubbo源码分析1-reference bean创建
  7. B站运维团队成长的血泪史
  8. typedef (还需经常看看加深理解)
  9. ubuntu 错误 &amp; 解决
  10. [Angular 2 Router] Configure Your First Angular 2 Route
  11. iis启动网站提示 文件正在使用
  12. mvc给html扩展方法:
  13. Java 初学者帮助文档以及基础教程
  14. DataSet中取值(转)
  15. hdu4956 Poor Hanamichi
  16. crm使用soap删除实体
  17. UNIX网络编程——揭开网络编程常见API的面纱【上】
  18. HAOI(多省联考)2019退役记
  19. Qt Creator中根据为Windows系统还是Linux系统对源码进行条件编译
  20. &lt;基础&gt; PHP 进阶之 流程控制(Process)

热门文章

  1. appium+python自动化50-生成定位对象模板templet(jinja2)
  2. sql语句 -- 倒序 升序
  3. CDK上安装kube-dashboard
  4. [转]Understanding Integration Services Package Configurations
  5. yum安装 lnmp (linux+nginx+php7.1+mysql5.7)
  6. MFC 带Ribbonbar的窗口 实现全屏和取消全屏
  7. 绿化和卸载 DOS 批处理
  8. div 隐藏和显示
  9. 网页HTML代码:滚动文字的制作
  10. chrome浏览器 提示Adobe Flash Player未安装的解决方法