Posts

Showing posts from April, 2020

Online classes notes on computer science

Image
😜Inheritance in c++ 🔎 Definition :-  • Inheritance is the one of the main feature in Oop. Inheritance is the method by which the object of one class is gets two properties of another class. • The mechanism that allows us to extend the definition of the class without making any physical changes to the existing class inheritance. Over view :-  • Inheritance is a capability of one class to acquire the property and characters from another class is called the parent (or) base or super class. And the class which inherited the properties of another class is called child (or) derived (or) sub class. • Inheritance ,lets you create a new classes from existing class . Any new class that you create any existing class is called derived class existing class is called base class. 🔍Advantages of Inheritance :- • Sometimes we need to repeat the code or we need repeat the whole class properties. So, it helps in various ways. 1.It saves the memory space 2.It saves time 3.It will rem

Printing_love_patterns💝

💝1.First  pattern💝 Output: Heart symbol .. #include<iostream.h> #include<conio.h> int main() { int i,j,a,b; clrscr(); for(j=1;j<=3;j++) { for(i=1;i<=20;i++) { if(i>=4-j&&i<=6+j||i>=15-j&&i<=17+j) {cout<<"$";} else cout<<" "; } cout<<endl; } for(a=1;a<=11;a++) { for(b=1;b<=20;b++) { if(b>=a-1&&b<=21-a) { cout<<"$"; } else cout<<" "; } cout<<endl; } getch(); } 💥💥2.Printing 💝hearts in 💟heart shape💥💥 2nd output: Printing 💝in heart shape #include<iostream.h> #include<conio.h> int main() { int i,j,a,b; clrscr(); for(j=1;j<=3;j++) { for(i=1;i<=20;i++) { if(i>=4-j&&i<=6+j||i>=15-j&&i<=17+j) {cout<<"💝";} else cout<<"  "; } cout<<endl; } for(a=1;a<=11;a++) { for(b=1;b<=20;b++) { if(b&g

Important questions of C++

Image
🙀chapter wise important  questions of  C++ 🙄Unit-I ✴️❗✳️❗✴️❗✳️❗✴️❗✳️❗✴️❗✳️❗ 】 🔎Chapter-1:-🔍 😻🔰Introduction to Oops.🔰😻 🤗1. Differences between C and C++.   C C++ 1】C support procedural oriented programming paradigm for code development. 1】C++ supports both procedural and object oriented programming paradigm.      2】C supports top down approach. 2】C++ supports bottom top approach. 3】When we compared to C++ ,c is a subset of C++ 3】 C++ superset of c  4】C does not support object oriented programming paradigm. Therefore it has no support for polymorphism encapsulation and inheritance . 4】Baingan object oriented programming language c++ supports polymorphism encapsulation and inheritance. 5】In C data and functions are separate entities therefore the mapping between functions is different and complex. 5】In C++ data and functions are encapsulated together . Therefore the mapping between data and functions are easy. 6】In c data free entities and can be manipul

Lab Programs of C++

Important programs of c++ language  Cleck here for out puts👉 : Out puts of this programs Note: 1.some program are not their in blog those will be posted soon. 2.some program not run in phone and some are show different out puts in phone .So, those type programs try in system.. 3. For Those who writing record : comment section may or may not be written in record.                                                                             ♠️🙏Please do follow, share and subscribe  ,any mistake in blog comment 🙏♠️                                                                             1.write a c++ program to find the add two interfere by class concept. #include<iostream.h> #include<conio.h> class abc { int a,b,c; public: void accept() { cout<<"Enter a,b value\n"; cin>>a>>b; } void add() { c=a+b; } void display() { cout<<c; } }; int main() { abc a; clrscr(); a.accept(); a.add(); a.display();