Posts

Showing posts with the label Variables

C Language - The Grammar of a Programming Language

Image
1. Language Grammar Human language has a wide variety of grammar , and learning it requires a great deal of time. You need to learn many grammatical elements such as nouns, verbs, tense, and word order. A programming language is a language with the clear purpose of instructing a computer what to do and how to do it. Even with a relatively small number of grammatical elements, it is possible to express meaning and execute actions. Unlike human language, a programming language can be used immediately once you understand a few core grammar rules . 2. C Language Grammar A programming language consists of the following five elements. Variables - store values. Operations - calculate values. Statements - execute content. Control - change the order of execution. Functions - group multiple statements into one. Understanding just these five grammar elements is enough to understand the basic structure of a program. 2.1. Variables A variable is a memory space that store...