Novice C language learning journey

avatar

梦幻光晕蓝色背景矢量图.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



0
0
0.000
11 comments
avatar

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

0
0
0.000
avatar

According to the Bible, How do you influence faith to Christian believers? (Part 1 of 3)

(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)



Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to Thank you, our beloved friend.
Check our Discord Chat
Join our Official Community: https://beta.steemit.com/trending/hive-182074

0
0
0.000
avatar
(Edited)

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.

0
0
0.000
avatar

what is the mean that you said you had it for two years?
Are you a software engineer?What languages have you studied?

0
0
0.000
avatar

C coding... I am not a software engineer, I am an HPC engineer which sits a bit also on some grey areas of the software engineers and many other parts of High Performance Computing (HPC).

I have learned C, C++, Java and others I don't recall now. But after reading many languages you sort of start understand lots of things. Later in life I have learned a bit for Fortran, HTML, PHP, python, shell scrips, and others.

0
0
0.000
avatar

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!

0
0
0.000