UrbanPro

Learn C++ Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is encapsulation in C++?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

Make your future bright with me!!!

Encapsulation in C++ is defined as the wrapping up of data and information in a single unit. In Object Oriented Programming, Encapsulation is defined as binding together the data and the functions that manipulate them.
Comments

I have 10 years experience in teaching C, C++, Java, Python, tally, Ms-Excel, SQL.

Encapsulation is Normally private variable cannot be accessed from outside the class. That it is hidden from users. If you want others to read or modify the value of a private variable, you can provide public get and set methods. This get and set method working in Encapsulation. Ex: class Emp { private: int...
read more

Encapsulation is Normally private variable cannot be accessed from outside the class. That it is hidden from users. If you want others to read or modify the value of a private variable, you can provide public get and set methods. This get and set method working in Encapsulation.

Ex:

class Emp {

private:

int sal;

public:

void setSal(int s)

{ sal = s; }

int getSal()

{ return sal; }

};

void main()

{ Emp Obj1;

Obj1.setSal(100000);

cout << Obj1.getSal();

read less
Comments

Experienced Computer trainer having worked in IT sector for 20 years.

Encapsulation in C++ is defined as the wrapping up of data and information in a single unit. In Object Oriented Programming, Encapsulation is defined as binding together the data and the functions that manipulate them.
Comments

View 1 more Answers

Related Questions

Are C Programmers currently in demand?
Ofcourse, C is alwasy in demand. In the beginning a lot of the big project developed in C language. Now a days, there are a lot of language in market and speciallity is growing in IT field. For a big organization...
Harsha
Explain about protected internal access specifier?
protected access specifier is used in inheritance. Base class members are made accessible to its sub classes through protected access specifier. This access specifier works with in inheritance.
Sahiba
0 0
7
Which language is best, C, C++, Python or Java?
If you want to learn any languages C#, Java, ect. then must to learn C, C++ language as these are base or language to be strong in language skills. C++ is improved version of C language. C#, Java, J# and etc. which are improved version of C++.
Sribaghya
0 0
6
How do I perform multiplication in C++?
Multiplication in C++ is as simple as using the * operator. It's a fundamental arithmetic operation, familiar to most developers even with minimal experience in the language. The basic concept involves...
Venkataramanaiah
0 0
5
I am interested to enter IT field. But I am not from IT background. My qualification is BBM. I am planing to start with C and C++ course, but i don't have much idea about it. Can some one please let me know what is best course to start with.
if u really have interset in IT filed u better learn .net, core java, spring java, python programming languages than c and c++. but u don't know the basics programming language better going for c and c++ learning course.
Sachin

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

C++ Advanced Course Study With C++11 Features
OOPS(Object Oriented Programming Systems) In C++. Types of Languages 2GL(Basic,Instruction programming to microprocessors/MC), 3GL(COBOL(= EQUALS TO),C++,C,PASCAL,Java,C#) 4GL(HTML,CSS,JSON) Style...

File Handling in C++ : Lesson 1 Data Persistence
Data persistence refers to the existence of data in the program. In other words, it means the life of data. Data is the most significant part of a program and it must be stored properly and easily retrieved...
J

Tress And Its Traversal
Depth First Traversals:(a) Inorder (Left, Root, Right) : 4 2 5 1 3(b) Preorder (Root, Left, Right) : 1 2 4 5 3(c) Postorder (Left, Right, Root) : 4 5 2 3 1 Trees are one of the data structures like...

Implicit Typecasting & Explicit Typecasting
In C++ it is possible to cast child class reference variable to parent class Reference. When ever we are Converting a derived-class reference or pointer to a base-class reference or pointer is called...

C++ Program-Working with constant using const keyword
//Header files #include<iostream.h>#include<conio.h> //Main function void main(){ //using const keyword to declare constants with a specific type const int len=10; const int br=5; const...

Recommended Articles

Introduction C++ is an excellent programming language and many of the applications are written in C++ language. It has generic, object-oriented & imperative programming features, and also provides facilities for low-level memory manipulation. Successor of C language, it is an OOP (object oriented programming) language...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Looking for C++ Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C++ Language Classes?

The best tutors for C++ Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C++ Language with the Best Tutors

The best Tutors for C++ Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more