C++ is an object oriented, High level , Case sensitive, Platform independent, 3rd Generation’s programming language through which we can communicate with the computer system.<\/strong><\/p>\n\n\n\n Object oriented means program is divided into classes and objects.<\/p>\n\n\n\n It was developed by B Jarne stroustrup<\/a> at AT & T Bell Laboratory in USA in 1980.<\/strong><\/p>\n\n\n\n AT & T means American Telecommunication and Telegraph<\/p>\n\n\n\n It is an incremented or Extended or super set of C language.<\/strong> i.e Every term of C language is supported by this language<\/p>\n\n\n\n It is a Case sensitive language <\/strong>. i.e it treats different in upper case and lower case. a and A are not same in this language.<\/p>\n\n\n\n It is a platform independent language.<\/strong> i.e it supports any operating system like windows 10, windows 8, windows 7, Linux, Unix ..<\/p>\n\n\n\n It is used in both writing of system software and application software<\/em>.<\/p>\n\n\n\n It supports both the feature of Low level and High level language , so some says its a middle level programming language.<\/p>\n\n\n\n It also support Supports feature of structured programming and object oriented programming.<\/p>\n\n\n\n Programming Language:- The language which used to give instructions to computer.<\/strong><\/em><\/p>\n\n\n\n programming:- The process of giving instructions to computer. or the process of making program<\/em><\/p>\n\n\n\n Programmer:- The person who gives instructions to computer.<\/strong><\/em><\/p>\n<\/div><\/div>\n\n\n\n There are two types of programming language.<\/p>\n\n\n\n 1st Generation 1940-1950 Machine Language (0,1) <\/p>\n\n\n\n 2nd Generation 1950-1958 Assembly Language (Mnemonic code or small english words like ADD ,SUB, MULTI ..)<\/p>\n\n\n\n 3rd Generation 1958-1985 High level Language (English ) (3GL)<\/p>\n\n\n\n 4th Generation 1985-onward very High level Language (English )(4GL)<\/p>\n\n\n\n Note :- <\/p>\n\n\n\n G L :- Generation Language<\/p>\n\n\n\n 1st and 2nd Generation Low level language<\/strong>(known as)<\/p>\n\n\n\n 3rd and 4th Generation High Level language<\/strong>(Known as)<\/p>\n\n\n\n Low Level Language:- The language that does not include translator to convert source code into object code and does not provide portability is called low level language. i.e program made in one computer can not be used in other computer. <\/p>\n\n\n\n Example <\/p>\n\n\n\n 1st Generation \/ Machine language :- Instruction written in 0, 1 or binary code is called machine language. It is very easy for computer and tough for programmer. There was no any translator used.<\/p>\n\n\n\n 2nd Generation \/ Assembly Language:- Instructions written in small English words or Mnemonic code is called Assembly language. Assembler was used as Translator<\/a>.<\/p>\n\n\n\n High Level Language:- The language which includes any translator to convert source into object code and provides portability is called high level language. i.e program made in one computer can be used in other computer with no or minimum changes. Example 3rd and 4th Generation language. <\/p>\n\n\n\n C++ program format using class <\/strong><\/p>\n\n\n\n <\/p>\n\n\n\n Note:- After writing program we need Compile and Run.<\/p>\n<\/div><\/div>\n\n\n\n Compile Alt+ F9<\/strong><\/p>\n\n\n\n Run Ctrl +F9<\/strong><\/p>\n<\/div><\/div>\n\n\n\n <\/p>\n\n\n\n Any mistake done by programmer in a program is known as Error.<\/strong><\/p>\n\n\n\n There are three types of Error<\/em>s.<\/p>\n\n\n\n 1. Syntax Error: – Any mistake in Respect of programming Rules is known as syntax Error.Syntax error is detected by the computer.<\/strong><\/p>\n\n\n\n Example:<\/p>\n\n\n\n Semicolon missing (;)<\/p>\n\n\n\n Curly bracket not balanced etc\u2026<\/p>\n\n\n\n 2. Logical Error: – Any mistake done by programmer in program\u2019s logic is known as logical error. Logical error is not detected by computer.<\/strong><\/p>\n\n\n\n Example:<\/p>\n\n\n\n * Symbol used instead of +<\/strong> etc…<\/p>\n\n\n\n <\/p>\n\n\n\n Note: – compilation Error (syntax and Logical)<\/p>\n\n\n\n 3. Run Time Error: – Error which arises after error free compilation is known as Run time error.<\/strong><\/p>\n\n\n\n Example:<\/p>\n\n\n\n <\/p>\n\n\n\n output<\/p>\n\n\n\n NIPS ACADEMY<\/p>\n\n\n\n Abadganj<\/p>\n<\/div><\/div>\n\n\n\n Steps to solve a problem written in simple English language, is known as Algorithm.<\/p>\n\n\n\n Rules for writing Algorithm<\/p>\n\n\n\n There are following rules for writing an algorithm.<\/p>\n\n\n\n IF<condition> then<\/p>\n\n\n\n …………………………….<\/p>\n\n\n\n ……………………………..<\/p>\n\n\n\n END IF<\/p>\n<\/div><\/div>\n\n\n\n while<condition> then<\/p>\n\n\n\n ………………………………..<\/p>\n\n\n\n …………………………………<\/p>\n\n\n\n END WHILE<\/p>\n\n\n\n Note:- No Need to follow Grammatical Rules, it is never wrong but should be understandable and written in copy before writing in computer.<\/strong><\/p>\n\n\n\n Q. Write an Algorithm to Post a letter<\/strong>.<\/em><\/p>\n\n\n\n Step 1:- START<\/p>\n\n\n\n Step 2:- Write a Letter<\/p>\n\n\n\n Step 3:- put the letter in an Envelope<\/p>\n\n\n\n Step 4:- write address on Envelope<\/p>\n\n\n\n Step 5:- post the letter into letterbox<\/p>\n\n\n\n Step 6:- STOP<\/p>\n\n\n\n <\/p>\n\n\n\n Q. write an Algorithm to find sum of two numbers.<\/strong><\/p>\n\n\n\n Step 1:- START<\/p>\n\n\n\n Step 2:- INPUT A,B<\/p>\n\n\n\n Step 3:- C=A+B<\/p>\n\n\n\n Step 4:- PRINT C<\/p>\n\n\n\n Step 5:- STOP<\/p>\n\n\n\n <\/p>\n\n\n\n Symbolic or Graphical representation of a program , is known as Flowchart.<\/p>\n\n\n\n Symbolic representation of Input, Output and Process is called Flowchart.<\/p>\n<\/div><\/div>\n\n\n\n There are following symbols that are used in flowchart.<\/p>\n\n\n\n Symbol…………………………. Purpose<\/p>\n\n\n\n Oval \/ Terminal box …………… START or STOP<\/p>\n\n\n\n Parallelogram………………… INPUT or OUTPUT<\/p>\n\n\n\n Rectangle………………………… Process<\/p>\n\n\n\n Rhombus \/ Diamond ……………………. Decision<\/p>\n\n\n\n Arrow ………………………….. Flow line<\/p>\n\n\n\n <\/p>\n\n\n\n Data type shows about the nature of variable. i.e type to be stored,range, required memory,etc..<\/strong><\/p>\n\n\n\n Data type is a type of data through which data are recognized and categorized.<\/em><\/p>\n\n\n\n <\/p>\n<\/div><\/div>\n\n\n\n These data types are at the lowest level that represent actual data in computer’s Memory.<\/p>\n\n\n\n Example :<\/p>\n\n\n\n char ,int ,float, long ,double, void …<\/p>\n<\/div><\/div>\n\n\n\n These data types are inherited from primary data type. i.e we have to take help of primary data type when we use derived data type.<\/p>\n\n\n\n example:<\/p>\n\n\n\n Array, pointer, Function etc.<\/p>\n<\/div><\/div>\n\n\n\n The data type defined by the user with the help of primary data type is called user defined data types.<\/p>\n\n\n\n Example:<\/p>\n\n\n\n structure , union , class , enumeration, etc.<\/p>\n\n\n\n Data types………………………….Size(Byte)……………………..Range<\/p>\n\n\n\n signed char OR char …………………………1 ……………………………….-128 to 127<\/p>\n\n\n\n unsigned char ………………………………….1 ……………………………….0 to 255<\/p>\n<\/div><\/div>\n\n\n\n <\/p>\n\n\n\n signed int OR int ……………………………..2…………………………………-32768 to 32767<\/p>\n\n\n\n unsigned int …………………………………….2……………………………….0 to 65535<\/p>\n<\/div><\/div>\n\n\n\n <\/p>\n\n\n\n signed long OR long ………………….4…………………-2147483648 to 2147483647<\/p>\n\n\n\n unsigned long……………………………….4…………………0 to 4294967295<\/p>\n\n\n\n <\/p>\n\n\n\n float …………………………..4…………………….-3.4 *10^38 to 3.4 to 10^ 38<\/p>\n\n\n\n double ……………………8…………………. -1.7*10^308 to 1.7*10^308<\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n <\/p>\n\n\n\n long double ……………..10 ……….. …-1.7*10^4932 to 1.7*10^4932<\/p>\n\n\n\n <\/p>\n\n\n\n <\/p>\n\n\n\n <\/p>\n\n\n\n <\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":" C++ is an object oriented, High level , Case sensitive, Platform independent, 3rd Generation’s programming language through which we can communicate with the computer system. Object oriented means program is divided into classes and objects. It was developed by B Jarne stroustrup at AT & T Bell Laboratory in USA in 1980. AT & T […]<\/p>\n","protected":false},"author":1,"featured_media":314,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,3,9,7,8,6],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-11th-computer-science","category-12th-computer-science","category-bca","category-cbse-12th-computer-science","category-cbse","category-jac-12th-computer-science","category-jac"],"_links":{"self":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":2,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":603,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/313\/revisions\/603"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media\/314"}],"wp:attachment":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Note:-<\/h3>\n\n\n\n
\n
Basic Format of C++ Program <\/a><\/h4>\n\n\n\n
#include<iostream.h>\n#include<conio.h>\nvoid main()\n{\nclrscr( );\n\u2026\u2026\u2026\u2026\u2026\u2026\u2026..\n\u2026\u2026\u2026\u2026\u2026\u2026\u2026.\ngetch( );\n}\n<\/code><\/pre>\n\n\n\n#include<iostream.h>\n#include<conio.h>\nclass nips\n{\npublic:\nint a,b,c;\nvoid show( )\n{\n\u2026\u2026\u2026\u2026\u2026\u2026\u2026\n}\n};\nvoid main()\n{\nclrscr( );\nnips obj;\n\u2026\u2026\u2026\u2026\u2026\u2026\u2026..\n\u2026\u2026\u2026\u2026\u2026\u2026\u2026.\ngetch( );\n}\n<\/code><\/pre>\n\n\n\nError \/ Bug in Programming<\/h3>\n\n\n\n
\n
Comments :- <\/h3>\n\n\n\n
\n
\n
\/* Q. write a program to print your Name.\n and Address. *\/\n#include<iostream.h>\n#include<conio.h>\nvoid main() \/\/ indicates Starting of program\n{\nclrscr();\t\t\/\/to clear the screen\ncout<<\u201dNIPS ACADEMY\u201d;\ncout<<\u201d\\n Abadganj\u201d;\ngetch();\n}\n<\/code><\/pre>\n\n\n\nAlgorithm :- <\/h3>\n\n\n\n
\n
\n
\n
\n
\n
\n
\n
\n
Flowchart: –<\/h3>\n\n\n\n
Data Type in C++<\/h3>\n\n\n\n
\n
\n
\n
Primary Data types<\/h3>\n\n\n\n