02 - Variable & C - Structure
02 - Variable & C - Structure
Constants
An entity whose value doesn’t change is called a constant.
Types of constant
Primarily there are 3 types of constant:
1. Integer Constant -1,6,7,9
2. Real Constant -322.1,2.5,7.0
3. Character Constant ‘a’,’$’,’@’(must be enclosed within single inverted commas)
Keywords
These are reserved words whose meaning is already known to the compiler. There
are 32 keywords available in c:
do static if while
Copy
File : first.c
The basic structure of a C program
All c programs have to follow a basic structure. A c program starts with the main
function and executes instructions presents inside it. Each instruction terminated
with a semicolon(;)
There are some basic rules which are applicable to all the c programs:
Comments
Comments are used to clarify something about the program in plain language. It is a
way for us to add notes to our program. There are two types of comments in c:
Copy
& is the “address of” operator, and it means that the supplied value should be copied
to the address which is indicated by variable i.