why can't we declare data member of class auto register or
extern

Answer Posted / kavitha shetty

since data members gets memory allocated through object not
individual..so always memory allocated for object...
otherwise u might get error like illegal storage class

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you want to share several functions or variables in several files maitaining the consistency how would you share it?

561


State the difference between pre and post increment/decrement operations.

616


What is the outcome of cout< a) 16 b) 17 c) 16.5

631


What is general format for a prototype?

607


How to declare an array of pointers to integer?

595






What is srand c++?

591


Carry out conversion of one object of user-defined type to another?

626


What is the use of string in c++?

559


What is the sequence of destruction of local objects?

568


Why ctype h is used in c++?

538


What is a far pointer? where we use it?

630


What is a dll entry point?

572


What is the best ide for c++?

583


What is token c++?

592


Specify some guidelines that should be followed while overloading operators?

629