Posts

Showing posts from October, 2016

INPUT/OUTPUT Operators

Image
The Standard Input Operator ">>" also called stream extraction operator is used to get an input. It is used with the standard input stream(cin). It stores the input in a variable. Example: Getting an input in a variable named "In". cin>>In; The Standard Output Operator "<<" also called stream insertion operator is used to display output. It is used with the standard output stream(cout). It prints text or some valueon the output screen. Example: Printing "Hello" on the screen. cout<<"Hello"; Example: Printing a calculation. cout<<2+7;   //Prints '9' The difference comes out on the basis of use of quotes"". Cascading of I/O Operators Cascading refers to taking multiple inputs or outputs in a single line. Multiple inputs takes place by placing ">>" between the different variable names. Multiple outputs occur by placin

Tokens

A token is a group of characters that logically belong together. They are like building blocks of a Programming Language.The programmer can write a program by using tokens. C++ uses the following types of tokens. 1. Keywords These are some reserved words in C++ which have predefined meaning to compiler called keywords. It is discussed in previous section. 2. Identifiers Symbolic names(a sequence of alphabets,digits &/or underscores) can be used in C++ for various data items used by a programmer in his program. There are several rules for the formation of an identifier: An identifier can consist of alphabets, digits and/or underscores. It must not start with a digit C++ is case sensitive that is upper case and lower case letters are                considered different from each other. It should not be a reserved word. 3. Literals(Constants) Data items that never change their value during the execution of the program.You will learn more about them later. 4. P

Getting Started with C++

Image
C++ Character Set Character set is a set of valid characters that a language can recognize. Letters A-Z, a-z Digits 0-9 Special Characters Space  +  -  *  /  ^  \  ()  []  {}  =  !=  <>  ‘  “  $  ,  ;  :  %  !  & ? _  #  <=  >=  @  Formatting characters backspace, horizontal tab, vertical tab, form feed, and carriage return Tokens A token is a group of characters that logically belong together. They are like building blocks of a Programming Language.The programmer can write a program by using tokens. C++ uses the following types of tokens. Keywords Identifiers Literals(Constants) Punctuation Operators Compilers/IDEs(Integrated Development Environment) Turbo C++: Download link  Turbo C++ CodeBlocks: Download link  CodeBlocks See it all in a video:

History Of C++

Image
Your very own C++ was not available for programming until the 70's.It was only in the 1978 at AT&T Bell Labs , when its head Bjarne Stroustrup wanted to create a new language based on his experience. He chose to redevelop the language C . He found that something is missing in this general purpose programming language . He found that it was lacking behind the concepts of Object Oriented Programming , which were present in one of his favorite Programming language Simula 67 . So, he started his work for what he then called "C with Classes". It was called with the same name until 1983. He wrote many books regarding this language.

What is C++?

Image
C++ is a general purpose programming language used for creating programs that range from the easiest to the great programs like Operating Systems, Web Browsers, E-mail clients ,Photo editing software etc.