ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
why can't we declare data member of class auto register or 
extern
 Question Submitted By :: Rajnesh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: why can't we declare data member of class auto register or extern
Answer
# 1
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 ?    1 Yes 0 No
Kavitha Shetty
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is the difference between method and message? HP2
1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?  2
difference between c and c++? Infosys8
whats the size of class EXP on 32 bit processor? class EXP { char c1; char c2; int i1; int i2; char *ptr; static int mem; }; Huawei4
What is "mutable" keyword?  2
What is a "RTTI"? HCL5
Explain the need for "Virtual Destructor"? Infosys1
Find the second maximum in an array? HCL2
why we cant create array of refrences  2
What is problem with Runtime type identification?  1
What happens if an exception is throws from an, object's constructor and object's destructor? Wipro1
Disadvantages of c++  3
Is there something that we can do in C and not in C++? Patni6
Which uses less memory? a) struct astruct { int x; float y; int v; }; b) union aunion { int x; float v; }; c) char array[10]; Quark3
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. Quark1
Explain the difference between 'operator new' and the 'new' operator? Lucent1
what is pulse code modulation? Wipro1
how to find the maximum of 10 numbers ?  3
Give 2 examples of a code optimization?  1
Write the program for fibonacci in c++?  3
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com