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

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 the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass

0 Answers  

Who was the creator of c++?

0 Answers  

What are the defining traits of an object-oriented language?

0 Answers  

Where do I find the current c or c++ standard documents?

0 Answers  

List the types of polymorphism in c++?

0 Answers  

What is function declaration in c++ with example?

0 Answers  

Explain unexpected() function?

0 Answers  

Define 'std'.

0 Answers  

Why is it called c++?

0 Answers  

sizeof- is it functioning statically or dynamically?

2 Answers  

if int1 has the value 12, int has the value 18, and int3 has the value 21, what is the result: int1 < int2 && int2 < int 3

3 Answers  

Write a program to calculate the following i want a c++program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)

4 Answers   HTC, TCS,