Skip to main content

C Plus Plus programming tutorial | Basics of C++

NETWORK TECH WORLD

 C Plus Plus programming tutorial | Basics of C++

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 .

Comments

Popular posts from this blog

Removing Norton Anti-virus 2004, How to remove the Registry Enteries

NETWORK TECH WORLD  Found this on the Norton Web site. I finally got fed up with Norton 2004 AV and switched to Avast. Had lots of problems removing Norton, lots of stuff left over in the registry. After a few Google searches, I found this. http://service1.symantec.com/SUPPORT/nav.nsf/docid/2004020909040706?Open&src=&docid=2001092114452606&nsf=nav.nsf&view=df0a595864594c86852567ac0063608c&dtype=&prod=&ver=&osv=&osv_lvl= FYI, this is from the Symantec.com Site, so I am guessing it is nice and safe If you scroll down to the "Removal instructions" the first option is "To remove Norton AntiVirus from the registry" Click on the Plus sign and you can down load the removal tool (it is a .reg file that removes all the keys for Norton.) Direct Link for the file: ftp://ftp.symantec.com/misc/consumer/nav/nav2004xp_reg_removal.reg After I got done, Avast started working right and my system seemed to be running alot...

An Introduction into TeleScan

NETWORK TECH WORLD  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%                                                  %%%              tm %%%  %%%   %%%%%%% %%%%%%% %%%           %%%%%  %%%%%      %%%      %%%%%%    %%%  %%%                   %%%          %%%    %%%   %      %%%    %%%  %%%   %%%  %%%     %%%   %%%%%%% %%%     %%%   %%%%  %%%       %%% %%%   %%%  %%%   %%%  %%%     %%%   %%%     %%%             %%% %%%   %  %%%   %%% ...

Ten Keyboard Shortcuts Everyone Should Know

NETWORK TECH WORLD  Ten Keyboard Shortcuts Everyone Should Know Using keyboard shortcuts is the easiest way to save you time and effort when you need to access commonly used symbols or processes. Indeed, navigating through shortcuts will keep your internet browsing fast and sharp. You can use shortcuts to inserts symbols instead of spending hours searching the internet for them and subsequently continuously copying and pasting them throughout your work. Some of the most used symbols in business are available in a three key combo. Pressing and holding Ctrl and Alt  and adding a letter to the combination will serve up the symbol. If you add C, you’ll deliver a ©. R, returns ®. T displays ™.  E shows € and the L creates a numbered list 1) 2). Lost Symbols © Ctrl Alt C ® Ctrl Alt R ™ Ctrl Alt T € Ctrl Alt E 3) Ctrl Alt L There’s a great little time saver if you’re working on many documents, across different programs at the same time. Ins...