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



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

Answer / 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

More C++ General Interview Questions

What is an object in c++?

0 Answers  


How do I tokenize a string in c++?

0 Answers  


What is scope of a variable? (LOLZ)

2 Answers   CA, TCS,


What is the difference between structure and class?

0 Answers  


What is the hardest coding language to learn?

0 Answers  






How do you define a class in c++?

0 Answers  


What are the differences between a struct and a class in C++?

7 Answers   Amazon, Wipro,


Why is c++ awesome?

0 Answers  


What information can an exception contain?

0 Answers  


Can malloc be used in c++?

0 Answers  


write a program to insert an element into an array

26 Answers   TCS,


What is c++ runtime?

0 Answers  


Categories