How to realize addition in C language
In this article, the editor introduces in detail "how to add in C language". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to add in C language" can help you solve your doubts. Let's follow the editor's ideas to learn new knowledge.
Start by writing programs:
# include int main () {int a = 1; int b = 2; int c = a + b; printf ("sum is% d\ n", c); return 0;}
Running result:
Sum is 3
Program analysis:
First define an integer variable an and assign 1 to a.
Then define an integer variable b and assign 2 to b.
Finally, an integer variable c is defined, its value is not obtained by assignment, but the added value of an and b is assigned to it, that is, the value of c is 3.
After reading this, the article "how to add in C language" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.