<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>C言語ｶﾞｲﾄﾞ</title>
<link>https://ameblo.jp/cgengogaido/</link>
<atom:link href="https://rssblog.ameba.jp/cgengogaido/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>Ｃ言語が分からない人やこのプログラムどうやってするのか分からない人やちょっと忘れたから確認にという人にオススメのサイトです。</description>
<language>ja</language>
<item>
<title>Ｃﾌﾟﾛｸﾞﾗﾑの基礎（２）</title>
<description>
<![CDATA[ <img src="https://stat.ameba.jp/blog/ucs/img/char/char2/121.gif" alt="王冠２"><font size="4"><font color="#0000FF"><strong>基本ﾃﾞｰﾀ型</strong></font></font><img src="https://stat.ameba.jp/blog/ucs/img/char/char2/121.gif" alt="王冠２"><br><br><strong><font color="#FF0000">char</font></strong>　　文字型　　１バイト　　<br><br><strong><font color="#FF0000">int</font></strong>　　整数型　　４バイト　　<br><br><strong><font color="#FF0000">float</font></strong>　　実数型　　４バイト<br><br><strong><font color="#FF0000">double</font></strong>　　倍精度実数　　８バイト<br><br>#include　<stdio.h><br>int　mani(void)<br>{<br>　　　int　a;<br>　　　char　b;<br>　　　float　c;<br><br>　　　a=123;<br>　　　b='x'<br>　　　c=123.4<br><br>　　　printf("%d %c %f",a,b,c);<br><br>　　　return 0;<br>}<br><br><img src="https://stat.ameba.jp/blog/ucs/img/char/char2/173.gif" alt="アップ">のプログラムは正常のプログラムです。<br><br>でも、その中のint定義のものに実数の「123.4」を入れたらどうなるでしょうか<img src="https://stat.ameba.jp/blog/ucs/img/char/char2/040.gif" alt="はてなマーク"><br>それは・・・<br>実数部分が表示されなくなります。<br><br>#include　<stdio.h><br>int　main(void)<br>{<br>　　　int　a;<br>　　　int　b;<br><br>　　　a=123.4;<br>      b=123.4;<br><br>　　　printf("int定義の場合\n");<br>　　　printf("%d\n",a);<br>　　　printf("実数定義の場合\n");<br>　　　printf("%f",b);<br><br>     return　0;<br>}<br><br>のプログラムを実行すれば分かると思います(笑)<br><br><br>これで、Cプログラムの基礎を終了します<img src="https://stat.ameba.jp/blog/ucs/img/char/char2/176.gif" alt="！！"><br><br><br>次は、入出力と演算子です<img src="https://stat.ameba.jp/blog/ucs/img/char/char2/098.gif" alt="クラッカー"></stdio.h></stdio.h>
]]>
</description>
<link>https://ameblo.jp/cgengogaido/entry-10483842203.html</link>
<pubDate>Wed, 17 Mar 2010 05:39:29 +0900</pubDate>
</item>
<item>
<title>Ｃﾌﾟﾛｸﾞﾗﾑの基礎</title>
<description>
<![CDATA[ <br><img src="https://stat.ameba.jp/blog/ucs/img/char/char2/240.gif" alt="本">定数<img src="https://stat.ameba.jp/blog/ucs/img/char/char2/240.gif" alt="本"><br><br>ﾌﾟﾛｸﾞﾗﾑ<br>#include <stdio.h><br>int main(void)<br>{<br>　　　char   a;<br>　　　int    b;<br>　　　float  c;<br><br>　　　<strong> a='x';<br>　　　b=12;<br>　　　c=123.4;</strong><br><br>　　　printf("%c %d %f\n",a,b,c);<br><br>　　　return 0;<br>}<br><br>「'x'」を<strong><font color="#FF0000">文字定数</font></strong>、<br>「12」を<strong><font color="#FF0000">整数定数</font></strong>、<br>「123.4」を<strong><font color="#FF0000">実数定数</font></strong>という。<br><br>また、「%c %d %f」などを<strong><font color="#FF0000">書式指定子</font></strong>という。<br><br><br><img src="https://stat.ameba.jp/blog/ucs/img/char/char2/240.gif" alt="本">変数<img src="https://stat.ameba.jp/blog/ucs/img/char/char2/240.gif" alt="本"><br><br>ﾃﾞｰﾀ型　変数名；<br><br>Ex.int a;<br><br>ﾌﾟﾛｸﾞﾗﾑ<br>#include <stdio.h><br>int main(void)<br>{<br>　　　char   a;<br>　　　int    b;<br>　　　float  c;<br><br>　　　a=12;<br>　　　b=5;<br>　　　c=a+b;<br><br>　　　printf("%d\n",c);<br><br>　　　return 0;<br>}<br><br>表示結果は<br><br>１７<br><br>と表示されます。<br><br><br><img src="https://stat.ameba.jp/blog/ucs/img/char/char2/240.gif" alt="本">変数名の付け方と予約語<img src="https://stat.ameba.jp/blog/ucs/img/char/char2/240.gif" alt="本"><br><br>●数字(０～９)の１０文字、英文字Ａ～Ｚ、ａ～ｚ）の５２文字にアンダーバー(_)を含めた６３字である。<br>●英文字かアンダーバーで始まる３２文字以内の英数字文字列でなければならない。<br>●予約語は使用できない。<br><br><br>予約語一覧　<br><strong>auto　　　　　　break　　　　　　case　　　　　　char<br>conts　　　　　continue　　　　default　　　　　do<br>double　　　　　else　　　　　　enum　　　　　　extern<br>float　　　　　　for　　　　　　　goto　　　　　　　if<br>int　　　　　　　long　　　　　　　register　　　　　　return<br>short　　　　　signed　　　　　sizeof　　　　　　static<br>struct　　　　　switch　　　　　　typedef　　　　　　union<br>unsigned　　　　void　　　　　　volatile　　　　　　while</strong><br><br>などです。もうお気づきの方はいると思いますが・・・<br>自分で定義した変数以外のほとんどが予約語なんですね(笑)</stdio.h></stdio.h>
]]>
</description>
<link>https://ameblo.jp/cgengogaido/entry-10482664814.html</link>
<pubDate>Mon, 15 Mar 2010 19:49:43 +0900</pubDate>
</item>
</channel>
</rss>
