Which access specifier is used where one wants data members to be accessed by other classes but not from outside objects?

Which access specifier is used where one wants data members to be accessed by other classes but not from outside objects? Correct Answer protected

Protected and public members are accessible from derived classes but public members can be accessed by objects of the class so protected specifier is the answer.

Related Questions

If private members have to be accessed directly from outside the class but the access specifier must not be changed, what should be done?
In the question below, are given a statement followed by three courses of actions numbered I, II and III. On the basis of the information given, you have to assume everything in the statement to be true, and then decide which of the suggested courses of action logically follow(s) for pursuing. Statement: With just two days to go for the second edition of Amazon Prime Day, the e-commerce giant has been keeping its loyalists busy with a seven-day entertainment marathon. Started on July 10 with the release of Amitabh Bachchan starrer '102 Not Out', Amazon has been dropping one title every day for its Prime members. With Video and Music, Amazon clearly wants to showcase that Prime day is not merely about products. Courses of action: I. Building on the success of its previous sales, Amazon is gearing up for a bigger event, with extra perks for its Prime members in the form of quality video and music content - and not just early access and quicker deliveries. II. Started on July 3, Prime members who play three songs from the millions on Amazon Prime Music stand a chance to win an Echo Dot every day, with two winners announced daily. III. With Raazi and Transformers: The Last Night slated for release in the next two days, members already have access to Dunkirk, Telugu hit Officer as well as Prime Original show, Comicstaan - a reality TV show to find India's next stand-up comedy star.
Jio is a big shot at reducing the cost of Internet access in India. The U.S., despite being the richest country in the world, lags far behind in terms of cost and penetration of Internet access. Cheap access to the Internet is an important step in bridging the access gap – access to good education, good healthcare, etc. But the market reaction to Jio is similar to the U.S. markets reaction to firms announcing their intention to diversify. (A)The final group of losers is the current shareholders of RIL. On announcement of Jio, the stock price of RIL fell. (B) It shows that the markets short-term reaction is usually proven correct in the long-run. (C) On losing end, the first groups of losers are the shareholders of other telecom companies. (D)The large amount of revenue the Government of India gets from auctioning off the nations natural resources is not necessarily a good thing because the Government does not have a stellar track record when it comes to spending the money. A large fraction of Government spending is wasted. (E) The second loser is the Government of India. The big money the Indian Government was raking in selling cellular bandwidth was actually coming from the pockets of the cellular consumers. (F)The first obvious winners of this scheme are customers. (G) The second winner is Mr. Ambani; he can potentially make a lasting impact as the man who brought Internet to millions of Indians. Question: Which of the following supports the decision of other companies opposing Reliance JIO Scheme?