C Plus Plus programming tutorial | Basics of C++

By -

This tutorial is about C++ Programming language. I will teach C++ from very basics to advanced level in this post and upcoming posts. Just wait and read all the posts regularly. This tutorial is mainly about theoretical knowledge but is very important!

Some Definitions :

  •  Bit : It is the smallest unit a computer can understand. it is either 0 or 1. 0 generally means circuit is OFF and 1 means ON.
  • ASCII : All characters on keyboard have a code which is known as ASCII code.
    Range A-Z  ->  65-90
    a-z  ->  97-122
  • Byte : Group of 8 bits. 1 byte means 1 character.
  • Program : It is a step by step instruction which tell what to do and how to do.
  • Object Code : A program which a machine can understand is called Object Program.\

Compiler : 
A program which converts source code[ English like step wise instruction to computer] to object code[language which a machine can understand].
IT executes the entire program at once and hence It is faster.

Interpreter :
A program which converts source code[ English like step wise instruction to computer] to object code[language which a machine can understand]. But the interpreter executes the program line by line and hence it is slower.
Constants : 
Integer Constant :

  • Consist of 0-9
  • Doesn’t includes commas or spaces.
  • Preceded by a + or – sign. + sign is assumed if there isn’t any sign.

Character constants : Any single character enclosed in single quote (‘). Ex :- ‘a’ ,  ‘b’ .

Strings : Generally consist of more than one character within double quote (“).
Ex: “comp”, “abcd”.

Difference between String and Character :
Character constant takes 1 byte for storage while string constant takes 2 bytes for storage because in String  a byte is reserved for Null Byte.
Memory representation : 
Character : ‘A’    ==   |A| << stored in one memory cell
String : “A”  ==  |A|\0|  << stored in 2 memory cells with \0 as a NULL byte.

Variables in C++ : These are the tokens that are identified by identified by an identifier and change the value during execution.
Ex : int a=5;
a=a+3;
cout<<a;
Here a is a variable. The initial value of a was 5 but it was then changed to 8 by command a=a+3 .

Ending the tutorial here!
The next tutorial will be about data types and a sample program.
Stay tuned with How to Hack!
Leave your feedback and queries in comments!  

 

Rishabh Saxena

, also known as Maverick is a curious learner who wants to be an expert in every possible field of computing. Apart from learning Hacking, Programming, Networking and SEO, he loves to play Counter Strike 1.6 and sharing his knowledge with others. To know more about him, follow him on Facebook and .

7 Comments to C Plus Plus programming tutorial | Basics of C++

  1. Hello there, just became aware of your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!

  2. Pretty component of content. I simply stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your weblog posts. Anyway I will be subscribing to your augment and even I fulfillment you get admission to consistently quickly.

  3. Thanks for such a detailed tutorial, was very useful to read. I need to deal with C++ for a last few months at my work, due to project connected with morpher.com so I’m pretty inrerested in C.

  4. Have you at any time considered incorporating extra videos in your site web-site blogposts to keep the readers far more amused? I indicate I just study from the entire article of yours and it absolutely was really superb but because I’m extra of the visual learner,I determined that to generally be far more helpful nicely permit me understand the way it turns out! I love everything you men are constantly up also. This type of clever operate and reporting! Maintain up the fantastic performs fellas I have added you guys to my blogroll. It is a terrific write-up thanks for sharing this helpful data.. I will go to your blog regularly for some most up-to-date publish.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

More in C++, Featured, Programming
Close