<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>stfuawsc</author_name>
  <author_url>https://blog.hatena.ne.jp/stfuawsc/</author_url>
  <blog_title>苔の一念岩をも通す ~目指せいつかはプログラマ~</blog_title>
  <blog_url>https://stfuawsc.hatenadiary.org/</blog_url>
  <categories>
    <anon>C</anon>
  </categories>
  <description>C言語では、文字列を格納出来る変数(所謂string型)が存在しない。 らしいので、文字列は文字型であるcharの配列として実現するそうだ。 で、配列に文字列を代入するには、strcpy()という関数を使うんだそうな。 #include &lt;stdio.h&gt; #include &lt;string.h&gt; /*コレいつも忘れる*/ int main(void) { char str[20]; strcpy(str, &quot;abcde&quot;); printf(&quot;strは%d文字だよ\n&quot;, strlen(str)); return 0; } ;; 実行結果 -&gt; strは5文字だよ あと、'\0'(ヌル文字)を文…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fstfuawsc.hatenadiary.org%2Fentry%2F20090413%2F1239629720&quot; title=&quot;配列に文字列を代入する - 苔の一念岩をも通す ~目指せいつかはプログラマ~&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>2009-04-13 22:35:20</published>
  <title>配列に文字列を代入する</title>
  <type>rich</type>
  <url>https://stfuawsc.hatenadiary.org/entry/20090413/1239629720</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
