Hello Again!
Since We have Discussed the Hello World Program,Now its time to discuss the contents of a program.
This was the Program we discussed:-
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World";
return 0;
}
In this Program ,There is a Input-Output stream Header file(iostream) , namespace , main() function , datatype (int), return statement and the Algorithm(I Know The the Program doesn't Fully Justify the Word).We will Discuss All These Topics including Many Other Topics in Detail,But wait we need to go Step by Step.So Here We Are ....
The First Thing You Need to Know About C++ is that it is a case sensitive and Compiler Based Language.Now Question is What is a Case Sensitive Language?A Language is Case Sensitive if it Differentiates Between Uppercase and Lowercase Letters i.e. It Doesn,t Consider Them Same.
Compiler Based Language Means It Needs to Compile The Program before Executing it.A compiler generate Machine code from source code.The Details of Compiler is a Completely Different Topic of Computer Science Which We will not discuss here.
Before we Start the Basic Concept and terms discussion we need to Know that C++ character set is all the Characters Present on the Keyboard.
The Smallest unit of a Program is Called a Token.A Token Can Be:-
1.Keyword
2.Identifier
3.Literal
4.Operator
5.Punctuator
Keywords-Some Words Are Already Fixed/Specified By the Compiler to Perform a Particular type of action.Ex-delete,int,etc.
Identifiers-It is Used For User defined Work.It is a Name Given to a Variable , Constant , Function or Class by the Programmer.There Are certain Rules For it as Followed:-
1.Name should be meaningful(to make good readable code).
2.It must start with an Alphabet.
3.Must not Include any Special Character except underscore( _ ).
Literals-A Literal is nothing But a token with Fixed Values.There are Mainly 5 types of Literals in C++ Which we will Discuss Next time but I am listing them here only.They are-
1.Boolean Literal
2.Integer Literal
3.Character Literal
4.Float Literal
5.String Literal
Operators-These are Arithematic ,Unary and Binary Operators used to perform different operations with one or more variables.
Punctuators-They are used as per syntax and requirement.Ex-; , , ,etc .
Here I Should Specify What is a Variable so that you can make Yourself a little bit clear.
A Variable is a Name given to the Memory Space Reserved to Store a Particular Type of data in accordance with its datatype(int,float-we will discuss later).
Don't be scared or hesitate to ask Questions and Don,t worry as you will Develop basics Programming Skills soon.I will also attach link to the videos of Programs we will Discuss later on.
So till then Keep learning and Happy Coding.....
Since We have Discussed the Hello World Program,Now its time to discuss the contents of a program.
This was the Program we discussed:-
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World";
return 0;
}
In this Program ,There is a Input-Output stream Header file(iostream) , namespace , main() function , datatype (int), return statement and the Algorithm(I Know The the Program doesn't Fully Justify the Word).We will Discuss All These Topics including Many Other Topics in Detail,But wait we need to go Step by Step.So Here We Are ....
The First Thing You Need to Know About C++ is that it is a case sensitive and Compiler Based Language.Now Question is What is a Case Sensitive Language?A Language is Case Sensitive if it Differentiates Between Uppercase and Lowercase Letters i.e. It Doesn,t Consider Them Same.
Compiler Based Language Means It Needs to Compile The Program before Executing it.A compiler generate Machine code from source code.The Details of Compiler is a Completely Different Topic of Computer Science Which We will not discuss here.
Before we Start the Basic Concept and terms discussion we need to Know that C++ character set is all the Characters Present on the Keyboard.
The Smallest unit of a Program is Called a Token.A Token Can Be:-
1.Keyword
2.Identifier
3.Literal
4.Operator
5.Punctuator
Keywords-Some Words Are Already Fixed/Specified By the Compiler to Perform a Particular type of action.Ex-delete,int,etc.
Identifiers-It is Used For User defined Work.It is a Name Given to a Variable , Constant , Function or Class by the Programmer.There Are certain Rules For it as Followed:-
1.Name should be meaningful(to make good readable code).
2.It must start with an Alphabet.
3.Must not Include any Special Character except underscore( _ ).
Literals-A Literal is nothing But a token with Fixed Values.There are Mainly 5 types of Literals in C++ Which we will Discuss Next time but I am listing them here only.They are-
1.Boolean Literal
2.Integer Literal
3.Character Literal
4.Float Literal
5.String Literal
Operators-These are Arithematic ,Unary and Binary Operators used to perform different operations with one or more variables.
Punctuators-They are used as per syntax and requirement.Ex-; , , ,etc .
Here I Should Specify What is a Variable so that you can make Yourself a little bit clear.
A Variable is a Name given to the Memory Space Reserved to Store a Particular Type of data in accordance with its datatype(int,float-we will discuss later).
Don't be scared or hesitate to ask Questions and Don,t worry as you will Develop basics Programming Skills soon.I will also attach link to the videos of Programs we will Discuss later on.
So till then Keep learning and Happy Coding.....
Comments
Post a Comment