C structs meet most definitions of what a "record" is. About the only thing you could add would be the ability to have dynamic sized arrays in a struct, but that's difficult to do in a fully compiled language like C.
Main Topics
Browse All TopicsHi,
What’s the difference between C struct types and higher-level language records? I don't know what's higher level than C, like Java perhaps, or Scheme? Any examples?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't know if this is right but this is my best guess?
In SQL a record is just a collection of data that has no 'type'.
In C, you are declaring a concrete type with a struct, so it can be both a type and also a collection of data at the same time.
Besides that, I see no difference!
Any thoughts?
Thanks
A struct can contain other structs but records and tables cannot contain other records or tables. Tables can contain foreign keys which are basically pointers to other tables.
In Java, C++ and other OO languages, there are classes where properties (member variables) and member functions are marked:
public - everyone can see it
protected - only inherited ones can see it
private protected - (does not exist in C++) public within the library, private otherwise
private - local within the class
A struct in C++ is just a class where everything is public. In C#, classes and structs are the same except that classes are created on the heap and structs on the stack. Someone in MS obviously really wanted to mess up C++ programmers.
Inheritence and virtual function mechanisms can be simulated using C structs. All you need to look at is the code generated by CFront (C++ front end in C when no C++ compilers existed) to see what can be done with structs in C.
Data in a C struct is just a piece of memory that gets it's meaning only because the program code uses it in a certain way and the program usually 'posses' the physical representation of the data.
Data in a database has context, which allows the database to do some fancy things, like building indexes or enforcing constraints. The data strorage is managed by the database and the user/program gets only a copy of it but cannot alter the data representation directly. A database can thus provide transaction control and manage access rights.
Business Accounts
Answer for Membership
by: x4uPosted on 2006-12-17 at 17:50:53ID: 18156291
When professors, teachers or books talk about higher level languages and do not mean a imperative programming language with it they often refer to so called 3rd generation languages like SQL.
ki/Imperat ive_progra mming ki/Declara tive_progr amming
http://en.wikipedia.org/wi
http://en.wikipedia.org/wi
Besides that a record is a general term for a well defined set of composed data and a C struct is one way to represent this in the C programming language.