What are the differences between a structure and a class in C?

Answer

C does not have a class, as classes are an Object-Oriented structure.

In OO methodology, a class is a definition from which an object reference is instantiated.

A C struct is a flat memory structure defining a data-type, which is a grouping of variables or references of varying types. Pascal uses the "record" type to define the same thing.

Improve Answer Discuss the question "What are the differences between a structure and a class in C?" Watch Question

First answer by Debiguana. Last edit by Debiguana. Contributor trust: 80 [recommend contributor]. Question popularity: 10 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > What are the differences between a structure and a class in C?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
What is jagged array?  Diee bw structure class in c?  Differences class and struct?  Diff between class and structure?  Difference bw structure and class?  Differnce between structure and class?  Diffrence between structure and class?  Diference between class and structure?  Difference bw structure and class in c?  What are the advantages of using struct?  Differences between structure and array?  Differences between class and structure?  Different between structure C and class C?  What are the differences between class struct in C?  What are the differences between a struct and a class in C?