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 the main use of c++?

1131


How much maximum can you allocate in a single call to malloc()?

1107


Explain bubble sorting.

1097


What are single and multiple inheritances in c++?

1103


Is ca high or low level language?

1085


What are punctuators in c++?

1165


Explain class invariant.

1067


Explain some examples of operator overloading?

1125


What is #include c++?

1137


What is a class definition?

1077


Can we use clrscr in c++?

1082


How would you differentiate between a pre and post increment operators while overloading?

1149


What are the advantages of using const reference arguments in a function?

1077


What is the difference between mutex and binary semaphore?

1238


What is a modifier in c++?

1155