C programming

S

sakib091404

hi,
I have a ques


what is the use of structure?



regd

sakib
S.I.NO.: 091404
MCE
IUT
 
K

Kenny McCormack

hi,
I have a ques


what is the use of structure?

Structure brings order to life.

--
No, I haven't, that's why I'm asking questions. If you won't help me,
why don't you just go find your lost manhood elsewhere.

CLC in a nutshell.
 
K

Kenny McCormack

A struct in C is an ordered collection of objects each of which may
have a different type.

Yes, but that's not the question being asked.
That answers "What is a structure?", but he asked "What is the use of
structure?" Totally different question.

--
(This discussion group is about C, ...)

Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch [sic] revelations of the childhood
traumas of the participants...
 
S

spinoza1111

Yes, but that's not the question being asked.
That answers "What is a structure?", but he asked "What is the use of
structure?"  Totally different question.

It is used to store either ordered or unordered collections of
disparate data. It is usually used to store unordered collections
unlike an array which always has a definite order, but, this being C,
code for structures can depend on the physical order of the
structure's data elements. Smart and good-looking programmers avoid
this.

Structures are used to keep track of and nail terrorists by storing
their name, perhaps an array of aliases, last known location such as
the Hotel Idris in Ouagadego Burkina Faso, etc. For example.
--
(This discussion group is about C, ...)

Wrong.  It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch [sic] revelations of the childhood
traumas of the participants...
 
S

spinoza1111

Structure brings order to life.

For example, in actually taking computer science, you have to show up
for class and do the assignments. This structure creates attention
span which helps you to avoid stupid bugs such as coding a strlen and
being off by one.

Structuralism was Claude Levi-Strauss' attempt to analyze myths
independent of their specific story line to show how common myths such
as Oedipus taught lessons such as "don't screw Mom".

Post-structuralism was the rejection of this commonality in French
philosophy.

Post-structuralism in programming is the replacement of codeless
structs with objects that can define in more fine detail the former
structure's behavior. It's very cool. For example, in C Sharp, you can
store (in a C sharp structure, which is really a lightweight object) a
toString() function that can format and print the data in the
structure. To do this in C, you must define the toString() function
separately and associate it with the program by keeping it close
(until some bozo like Seebach moves it) and putting the struct name in
the function name (until some clown like Heathfield changes it).

Indeed, as my code in C evolved while I was creating, in effect, a
special purpose Excel for real estate appraisal in the late 1980s, a
program which would allow the user to link fields by storing
calculations in fields, I could see that the C paradigm was unequal to
the strain, whereas as early as 1994 and Microsoft's release of a
(very primitive) OO VB-4, I could embed toString (and code for the
structure/object to self-inspect) where it bloody well bleeding
belonged.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

C programming 3
Turbo c 1
Array 2
Turbo C 0
c programming 3
C programming 12
Structure and Union 1
Turbo C 3

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top