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   SiteMap shows list of All Categories in this site.
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
What are the different types of Storage classes?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are the different types of Storage classes?
Answer
# 1
storage class is an instruction that give compiler 4
instructions .  there are 4 type storage class  1) automatic,
register , static ,external
 
Is This Answer Correct ?    5 Yes 0 No
Saroj Das ,balsore
 
  Re: What are the different types of Storage classes?
Answer
# 2
There are four types of storage classes.

1.Automatic: The scope is within the class that is like   
local to its class

2.Extern: The scope of this is used within the class as 
well as outside the class.so it is global

3.Regiter: These are mainly used for faster access of data.

4.Static: Once you declare the variable as static it will 
remain constant throughout the program
 
Is This Answer Correct ?    5 Yes 0 No
Manjusinga
 
 
 
  Re: What are the different types of Storage classes?
Answer
# 3
answers given by Manjusinga about static is wrong: 

it will be 
 
4.Static: Once you declare the variable as static it exist 
till the life of the program.
 
Is This Answer Correct ?    1 Yes 0 No
Ranjeet Garodia
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
How to reduce a final size of executable?  1
What happens if an exception is throws from an, object's constructor and object's destructor? Wipro1
What is "mutable" keyword?  2
Consider a c++ template funtion template<class T> T& Add(T a, T b){return a+b ;} if this function is called as T c = Add("SAM", "SUNG"); what will happen? What is the problem in the template declaration/ How to solve the problem. Samsung4
What is size of null class? HP3
Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast Quark1
Explain the difference between 'operator new' and the 'new' operator? Lucent1
What is the difference between static link library and dynamic link library? Tech-Mahindra1
How to stop conversions among objects? Symphony1
class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData Quark1
when can we use virtual destructor? HP2
Find the second maximum in an array? HCL2
If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B – D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2.  1
how to find the maximum of 10 numbers ?  3
What are the different operators in C++? HP1
What is the difference between "calloc" and "malloc"? ADP5
Explain the ISA and HASA class relationships. How would you implement each in a class design?  2
catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e; Quark2
Explain the need for "Virtual Destructor"? Infosys1
What is the difference between a copy constructor and an overloaded assignment operator? Microsoft3
 
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