<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>computermonkey</author_name>
  <author_url>https://blog.hatena.ne.jp/computermonkey/</author_url>
  <blog_title>電脳ミツバチのコンピュータ広報室</blog_title>
  <blog_url>https://straypccat.hatenablog.com/</blog_url>
  <categories>
    <anon>C言語全般</anon>
  </categories>
  <description>文字列の終端にNULLを入れる間違いが多くある。 array[len]=NULL; これは環境によって動くが間違いである。 文字列は「ナル文字」で終わるのであって「ヌルポインタ」で終わるのではない。 ナル文字とは「全てのビットが０である文字」と規格され、'\0'で表す値がゼロのchar型のことである。 確かにstdio.hで#define NULL 0と書かれているので'\0'と書いても0と定数で書いても間違いではないことが多い。 だが０と言うものが定数であるのかヌルポインタであるのか分からないときがある。 main() { int *p=6; }と記述すると”警告 W8069 null.c …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fstraypccat.hatenablog.com%2Fentry%2F20051217%2F1134791477&quot; title=&quot;NULLと0と&amp;#39;\0&amp;#39; - 電脳ミツバチのコンピュータ広報室&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>2005-12-17 12:51:17</published>
  <title>NULLと0と'\0'</title>
  <type>rich</type>
  <url>https://straypccat.hatenablog.com/entry/20051217/1134791477</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
