Let's begin writing some C language code. Prior to that, there are a few rules that a beginner must follow.
➡️Each instruction in a C program is written as a separate statement. Therefore a complete C program would comprise of a series of statements.
➡️The statements in a program must appear in the same order in which we wish them to be executed; unless of course the logic of the problem demands a deliberate ‘jump’ or transfer of control to a statement, which is out of sequence.
➡️Blank spaces may be inserted between two words to improve the readability of the statement. However, no blank spaces are allowed within a variable, constant or keyword.
➡️All statements are entered in small case letters.
➡️C has no specific rules for the position at which a statement is to be written. That’s why it is often called a free-form language.
➡️Every C statement must end with a ;. Thus ; acts as a statement terminator.
➡️Let us now write down our first C program. It would simply calculate simple interest for a set of values representing principle, number of years and rate of interest.
🌐 C/C++Programming Related Courses:
Foundation Course: https://www.hexnbit.com/product/found...
✨ HEXNBIT Social Media :
Facebook: / hexnbit
Instagram: / hexnbit
Twitter: / hexnbit_life
YouTube: / hexnbit
🎓 Other Courses:
Visit : https://www.hexnbit.com/
About us: Hexnbit provides one-stop solutions for the students & working professionals in Skill development programs. The platform not only provides subject expertise to the candidates but also, give them industry exposure to apply their learnings analytically in a practical real-world.
コメント