adplus-dvertising
frame-decoration

Question

What is correct about the static data member of a class?

a.

A static member function can access only static data members of a class.

b.

A static data member is shared among all the object of the class.

c.

A static data member can be accessed directly from main().

d.

Both A and B.

Answer: (d).Both A and B.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is correct about the static data member of a class?

Similar Questions

Discover Related MCQs

Q. Which of the following provides a reuse mechanism?

Q. Which of the following statement is correct?

Q. First object oriented language 'Smalltalk' were first appeared in

Q. Complex real object contains

Q. Member function will access data and return the value to user when it is

Q. Language which is called pure object oriented language because everything in it is treated consistently as an object, from primitives such as characters and punctuation, all the way up to whole classes, prototypes, blocks, modules, etc. is

Q. In object oriented language, single unit which has data and its function is termed as

Q. Data in an object oriented language is safe from accidental alternation as it is

Q. If we want to read a data item in an object, member function in an object is

Q. Data encapsulation and data hiding are key features of

Q. Which of the following language designed mainly for object oriented programming, but with some procedural elements?

Q. Object oriented language has single unit which combines

Q. The wrapping of private data in classes in object-oriented programming languages is termed as

Q. In Smalltalk language, object functions are named as

Q. Sending a message to the object is referred to as

Q. Object provides an approach to program organization by helping to

Q. First object oriented language is

Q. If we want to modify the data we must know the data

Q. Attributes are also known as

Q. Function which provides the only way to access its data is