<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ktrito33</author_name>
  <author_url>https://blog.hatena.ne.jp/ktrito33/</author_url>
  <blog_title>怠日記</blog_title>
  <blog_url>https://nmk365.hatenablog.jp/</blog_url>
  <categories>
    <anon>C言語</anon>
  </categories>
  <description>C言語で環境変数を取得するには getenv() を使う。 次のプログラムは環境変数 TEMP の内容を出力する。 #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main() { char *env_value; env_value = getenv(&quot;TEMP&quot;); if (env_value == NULL) { printf(&quot;There are no environment variables.\n&quot;); return 1; } else { printf(&quot;value: %s\n&quot;, env_value); return 0; } } gete…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnmk365.hatenablog.jp%2Fentry%2Fclang-getenv&quot; title=&quot;C言語: 環境変数を取得する | getenv() - 怠日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-05-01 23:48:09</published>
  <title>C言語: 環境変数を取得する | getenv()</title>
  <type>rich</type>
  <url>https://nmk365.hatenablog.jp/entry/clang-getenv</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
