Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

class X
{
public:
int x;
static void f(int z);
};
void X::f(int y) {x=y;}
What is the error in the sample code above?
a) The class X does not have any protected members.
b) The static member function f() accesses the non-static z.
c) The static member function f() accesses the non-static x.
d) The member function f() must return a value.
e) The class X does not have any private members.

Answer Posted / guest

option 'c' is the answer

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include iomanip?

951


What is input operator in c++?

983


What is atoi in c++?

1017


Define a conversion constructor?

1025


Comment on local and global scope of a variable.

1084


Is there finally in c++?

1028


What things would you remember while making an interface?

952


How do you flush a buffer in c++?

1058


What does obj stand for?

1089


What is the difference between reference and pointer?

1097


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1964


Name the debugging methods that are used to solve problems?

1037


How one would use switch in a program?

1025


Can a built-in function be recursive?

975


What is enum c++?

1149