Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between struct and class?

Answer Posted / hrpynux@gmail.com

Structs are value type whereas Classes are reference type. Structs are stored on the stack whereas Classes are stored on the heap. Value types hold their value in memory where they are declared, but reference type holds a reference to an object memory.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is main a class in c++?

1006


Is c++ a pure oop language?

1085


What is the copy-and-swap idiom?

1120


What do you mean by global variables?

1076


What is set in c++?

1135


Comment on local and global scope of a variable.

1164


Explain the concept of dynamic allocation of memory?

1100


How many ways can a variable be initialized into in C++?

1026


What is the difference between interpreters and compilers?

1193


Is python written in c or c++?

1150


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<

2057


Are c and c++ different?

994


What is diamond problem in c++?

1002


Can non-public members of another instance of the class be retrieved by the method of the same class?

1082


Out of fgets() and gets() which function is safe to use?

1134