C++ programming lecture notes ppt

how to do c programming and c++ ppt for beginners and c++ complete reference ppt
abhilakshya Profile Pic
Published Date:11-05-2017
Your Website URL(Optional)
by ABHILAKSHYAMEHTA (Computer Science PPT)Reference Book CLASS XI By Sumita AroraCHAPTER 6 GETTING STARTED WITH C++INTRODUCTION C ++ Programming language was developed at AT & T Bells LAB early in 1980’s by BJARNE STROUSTRUP.  STROUSTRUP added some features to his favorite language Simula 67. (Earliest OOP). STROUSTRUP called “ C with Classes ”. C++ ( C Plus Plus) is named by Rick Masitti.BJARNE STROUSTRUP December 30, 1950 ) (age 60) Born Aarhus, Denmark College of Engineering Chair in Occupation Computer Science Professor, Texas A&M University USA Known for The creation of C++BJARNE STROUSTRUP Bjarne Stroustrup giving a talk at Kent State University on C++0x in 2007. C++ CHARACTER SET Letters:- A-Z, a-z Digits:- 0 to 9 Special Symbols:- space + - / ( ) = = , „ “ ; : ? & White Spaces:- Blank Space , Horizontal Tab, Vertical tab, Carriage Return. Other Characters:- C++ can process any of the 256 ASCII Characters as data or as literal. TOKENS The Smallest individual unit in a program is known as Token. Lexical Unit is the another name given to Token. C++ has following Tokens 1) Key words 2) Identifiers 3) Literals 4) Punctuators 5) OperatorsKEY WORDS Key words are the words that convey special meaning to the compiler. Key words are also called as Reserved words meaning their meaning is reserved in C++. Some of Key words are, float int auto extern double case do while goto…etcIDENTIFIERS Identifier is an arbitrary long sequence of letters and digits. The first character must be letter. The underscore ( _ ) counts as letter. Upper and Lower case letters are different. All characters are significant.EXAMPLES OF IDENTIFIERS C++ is a Case Sensitive Language as it treats upper case letters and lower case letters differently. Some Valid identifiers, Myfile DATE9_7_8 z3t9x3  MYFILE _DS _FXR Some Invalid identifiers, DATA-REC 28dre breakLITERALS Literals often referred to as constants These are the data items that never change their value during the program run.TYPES OF C++ LITERALS INTEGER – CONSTANT CHARACTER – CONSTANT FLOATING – CONSTANT  STRING – LITERALINTEGER CONSTANT These are the whole numbers without any fractional part. An integer constant must have at least one digit and must not contain fractional part. It may contain + or - Sign. A number with no sign is assumed as positive. Commas can not appear in integer constant.TYPES OF INTEGER CONSTANTS DECIMAL INTEGER CONSTANTS OCTAL INTEGER CONSTANTS HEXADECIMAL CONSTANTSDECIMAL INTEGER CONSTANT An integer constant consisting of sequence of digits is taken to be decimal integer constant unless it begins with 0. For instance 1234,56,+86,-56,-89,-22 are decimal integer constant. OCTAL INTEGER CONSANT A sequence of digits starting with 0(digit Zero) is taken to be an octal integer constant.  for instance Decimal 8 is written as 010 as octal integer 8 =10 10 8 Decimal 12 is written as 12 = 14 10 8HEXADECIMAL INTEGER CONSTANT A Sequence of Digits preceded by 0x or 0X is taken to be an hexadecimal integer constant. For instance decimal 12 is written as  12 = 0XC 10 The Suffix l or L and u or U is attached to any constant indicates as long and unsigned respectively For Example:- 12L,189U …etcCHARACTER CONSTANT A character constant is one character enclosed within single quotes Valid constants „a‟ „z‟ „k‟ Invalid Constants a z k In c++ character constant must have single character and must be enclosed in single quotes.NONGRAPHIC CHARACTERS Nongraphic character constants are those characters that can not be typed directly from the keyboard. e.g backspace, tab, carriage return C++ Allows programmers to have certain nongraphic characters.

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.