C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.6)

6. 

Which of the following term is used for a function defined inside a class?

[A]. Member Variable
[B]. Member function
[C]. Class function
[D]. Classic function

Answer: Option B

Explanation:

No answer description available for this question.

Hani said: (May 20, 2012)  
The class variables are called data members
and the functions which are declared in the class is called member functions

Riyaj Khan said: (May 24, 2012)  
When member function is defined inside the class it is called as inline function.
Member function can also defined outside the class using class label. At this time it is not inline function.

Yogendra said: (Jun 21, 2012)  
What is different in class and classic function?

Md Azhar Hussain said: (Jun 27, 2012)  
The function defined in a particular class is called as a member of a class (or) member function and the variables defined in a particular class is member variables.

Sri said: (Sep 28, 2012)  
Actuvally instance variable are used in inside the class here we are talking about function so every member function will be declared in inside the class.

Rohit said: (Dec 8, 2012)  
Member variable are declared inside the class body. And member function are declared with in a class.

Prashant Kolhar said: (Apr 27, 2013)  
A member function can be defined inside or outside of a class. if defined inside it becomes inline. for function defined outside it uses scope resolution operator :: and it's class name.

Snehal said: (Nov 19, 2013)  
The class variable called data members. Function which are declared in the class called member function.

Manasawasthi said: (Dec 6, 2013)  
Because definition of class is:

Class is a collection of data members as well as member function so the term is used member function.

Oshan said: (Dec 20, 2013)  
In C language-structures have different data types.
Similarly in c++ language-we have class.
Class is mainly contains two parts:

1. Data members(attributes)
(these are private to the class by default).

2. Member functions(behaviour)
Member functions can also be defined outside the class using scope resolution(::).

Syntax:
return type <class name> :: function name()

While talking about inline function then it is function defined within class itself and should contain less number of lines in its definition or it can be said as function code.

Anky said: (Jan 9, 2014)  
Difference b/w class functions and member functions?

Rahul said: (Jan 22, 2014)  
Why we can not use private to the class?

Shaikh Moin Rukmoddin said: (Apr 8, 2014)  
The class variables are called data members and the functions which are declared in the class is called member functions.

When member function is defined inside the class it is called as inline function.

Member function can also defined outside the class using class label. At this time it is not inline function.

Husna said: (Nov 26, 2014)  
What is an class function?

Kandrasai said: (Dec 9, 2015)  
Generally we define a class to represent a group of objects with similar properties. Each and every object of that class is having the same properties, to explain that properties we need some variables, functions. These are called as members of the class.

So functions of a class are called as member functions, because they are intended to explain the properties of only that members which match of their type.

Shyam said: (Jan 6, 2016)  
Data member and member function will in inside a class.

K.Anitha said: (Jun 29, 2016)  
What is classic function and when it is used?

Priya said: (Jul 15, 2016)  
What is the difference between member function and member variable?

Sandhya said: (Sep 3, 2016)  
What is member function?

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.