Introduction
C Programming
C Advanced
Important C Programs
Modal Box
Tutorials
Syntax and Rules
There are certain rules for making a program in any programming language commonly known as the syntax of the langauge.
Syntax for C language program
- Every executable statement must end with semicolon symbol ” ; ” (except some, like control statements and function declarations.
- Every C program must contain exactly one main method (main function is the entry point for the program).
- All the system defined words (keywords) already defined in C language are in small case.
- Keywords can not be used as user defined names (identifiers).
- For every open brace ” { “, there must be respective closing brace ” } “.
- Every variable must be declared bofore it is used.
Rules for variable declaration in C Language
- Variable name is the combination of english alphabets , digits and underscore.
- No space is allowed in variable name.
- No special symbol is allowed except underscore ( _ ) .
- First character of a variable must be an english alphabet.
eg: char first_name, int price10 are valid variable names.
eg: charlast name, int5priceare not valid names.
Video/ C Introduction
Watch video in full size