C++ Free Tutorial
Introduction to C++ A C++ program is a collection of commands, which tell the computer to do "something". This collection of commands is usually called C++ source code, source code or just code. Commands are either "functions" or "keywords". Keywords are a basic building block of the language, while functions are, in fact, usually written in terms of simpler functions--you'll see this in our very first program, below. (Confused? Think of it a bit like an outline for a book; the outline might show every chapter in the book; each chapter might have its own outline, composed of sections. Each section might have its own outline, or it might have all of the details written up.)
History of C++ C++ History An object oriented programming language Initially named C with classes Developed by Bjourne stroustrip Renamed as c++ in 1983 The idea comes from C statement operator +* IS a superset of C
Constructor in C++ Constructors Constructor is a special function in C++ Constructor is used for initialization object auto init of object is done using constructor An object is never created without constructor Why Constructor Data members can’t initialize within the class class A { int x=10; int Y=20; }; Data members are not initialize within the class > object will created with garbage value. eg : class A { int x; int y; };
Functions in C++ Functions Inline functions Function default arguments Function overloading Pass by value
Classes and Objects in C++ Class Class is a data type or user defined data type. It is a collection of members, these members are 2 types. Data members Member functions In object oriented application development data is represent in the form of object
Aggregation in C++ Aggregation is a special type of composition. In this contained object is created outside container object.
This contained object is send to container object using member function or constructor. In this approach contained object is exist independent container object.
I/O operation in C++ How to perform I/O operation in c++ What is input ? Information given to the program, is called input In input data is flow inside the program It required a source(for reading ) stadin - - > standard input used as scanf function stdout ---> standard input used as printf function taken by monitor(gives destination) What is output : Information given by the program is called output In output data is flow outside the program In c++ I/O operations are alone using streams A stream is class is provide set of functions to perform input and output operations A stream represents input source (reading) and output destination (writing) C++ provides 2 stream classes
And Also Issues Interview Questions How to’s For More Android Free Tutorials Please Visit: http://bit.ly/1HYA8aV