scrobble.life
#art

Novice C language learning journey

梦幻光晕蓝色背景矢量图.png At first i do not know why the b array output result is different for the two code as follows. No long after,i found that because the b array is out of bounds.The b array is only include five elements.So only has five print result is valid for the b array. the first code as follows: #include"stdio.h" #include"stdlib.h" int main(void){

char b[5]={"hello world"};
int i;
i=0;
while(i<=15){
    printf("%c=%d\n",b[i],b[i]);
    i++;
    }
return 0;
system("pause");

} 捕获.PNG the second code as follows: #include"stdio.h" #include"stdlib.h" int main(void){

char b[5]={"hello world"};
int i=0;
while(i<=15){
    printf("%c=%d\n",b[i],b[i]);
    i++;
    }
return 0;
system("pause");

} 11.PNG

Comments · 7

  • @arcange(79)· 2391d

    Congratulations @sky-999! Your post was mentioned in the Steem Hit Parade for newcomers in the following category:

    • Comments - Ranked 9 with 10 comments
  • @steemitboard(66)· 2391d

    Congratulations @sky-999! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

    You made your First Vote

    You can view your badges on your Steem Board and compare to others on the Steem Ranking If you no longer want to receive notifications, reply to this comment with the word STOP

    Vote for @Steemitboard as a witness to get one more award and increased upvotes!
  • @joeyarnoldvn(68)· 2392d

    looks a little tougher to learn than html

  • @tuanis(59)· 2392d

    Welcome to steemit @sky-999.

    • Join @minnowsupport project for more help
    • Checkout @helpie for daily trivias and useful information
    • Join @qurator a good quality support project
    • Checkout @steembasicincome
    • Help us save the forest with @treeplanter

    Welcome the new steemians. Have a great day!

  • @coffeebreak(53)· 2392d

    Hey sky-999! If you would like to make your personal feed contain the top trending media and talking points of the whole internet, consider following @coffeebreak and @topicstoday accounts - And welcome to Steem!

  • @forykw(71)· 2392d

    Simple case... but...

    That's balls! =) Or if you are a girl, Great tits! =)

    I mean, you need to keep up with these teaching... or learning. Expose C languange like you want in your veins... I had it, for 2 years... by force, and I can tell you, it was worse than philosophy. But worth the investment in learning.

    I can tell you. If you like HPC, you have a job in that area with C knowledge. Also, who knows C knows C++ very easily, and other language. That's just because of the things you need to understand when you learn C.

    Myself, I am in a deeper layer of the pyramid, but I know more than just C, because I need to troubleshoot more things that just the logic part of computing.

  • @esteemapp(76)· 2392d

    Welcome sky-999!
    eSteem is mobile and desktop application that improves your experience on Steem.

    Download Android and iOS apps. Surfer Desktop application that helps you to gain new followers and stay connected with your friends, unique features - notifications, bookmarks, favorites, drafts, and more.
    We reward our users with encouragement upvotes as well as ESTM token.
    Learn more: https://esteem.app
    Join our discord: https://discord.me/esteem