Fundamentals of C and C++:
Every Programming Languages have some basic rules that should be followed to become a good programmer. Some of them are as follows.Rules for Declaring Variable Names:
- Variable name can be any combination of 1 to 31 alphabets, digits or underscore.
- The first character of variable name should be an alphabet.
- Commas, blanks or any other special symbols are not allowed in variable name.
C/C++ Keywords:
int double auto char if else long switch case enum register typedef struct extern return union const float short unsigned continue for signed void default goto sizeof volatile do break static while newInteger Float Conversions:
There are some Rules that should be kept in mind before using mathematic operations on different data types. They are as follows.- An arithmetic operation between an integer and integer always result in integer.
- An arithmetic operation between a float and float always result in float.
- An arithmetic operation between an integer and float always result in float.
Priority:
In programming languages, every symbol has its own importance and precedence over one another. Some of them are as follows.- * / %
- + –
- =
* have highest precedence and then /,%,+,-,= these shold be kept in mind before using them in athematic operations.
Comments
Post a Comment