Talking with Basic
Lets start with a basic intro of C++
C++ is one of the most interesting programming language, where you can make your own programs with very basic but necessary computer machine language.
Without wasting much time lets start , I have mentioned computer machine language earlier which is also called compiling language, its a special machine language which you need to learn to make your programs.
So what is a Compiler, its a software which converts high level language (human language) to low level language (machine language) which is necessary for program execution.
This language can recognize the following character set (set of valid characters) :
Letters A-Z,a-z
Digits 0-9
Special symbols space, + , - , * , / , ^ , ( , ) , [ , ] , { , } , = , != ,< , > , . , “ , ‘ , ; , : , ? , & , _ , >= , <= , % , #
I’m sure all of you familiar with the arithmetic operators i,e + , - , * , / . one thing must be noted that the percentage operator in C++ is used to give the net remainder when two numbers are divided.
Ex- for the operation 2 % 2 output will be 0
Similarly for 100 % 2 output will be 0
And for 4 % 3 output will be 1
You will be more clear when you start programming.
There are some important terms and rules in C++ which you need to remember to prevent errors in your program (due to which your program will not work).
1. C++ is case sensitive - that is the compiler treat upper case (A-Z) and lower case (a-z) words differently.
2. Keywords - they are reserved words in C++ which convey special meaning to the language compiler, they are all in lower case alphabet, as mentioned earlier that C++ is case sensitive you can not use your own words in programming, make sure all the keywords in your program is in lower case. I will let you know the keywords encountered during programming.

3. Identifiers - they are user defined variables whose values keep on changing during program execution.
- user need to follow some rules to define identifiers :
- it should start with a letter
- _ (underscore) counted as a letter
- no special character allowed except underscore
- keywords cannot be used as identifies
- upper and lower case letters can be used
- Valid Identifiers : num , NUM , _inPut , my_name etc
- Invalid Identifiers : 1_num (begins with a digit) , break (keyword) , my.name (uses special character)
Comments
Post a Comment