answersLogoWhite
Computer Programming
C Programming
C++ Programming

Structure in c?


Top Answer
User Avatar
Wiki User
Answered 2010-09-10 10:12:59

A structure (from now on called struct), is a list of several ODT (old data types).

I can have a structure that keeps track of, let's say my user info:

struct User {

char Username[256];

int TimeOn;

};

Note the semicolon.

Now, you can access structs by declaring a variable of struct User.

struct User UserOne;

UserOne.Username = "Bob";

UserOne.TimeOne = 0;

001
🙏
0
🤨
0
😮
0
😂
0
User Avatar

Your Answer

Still Have Questions?

Related Questions

Data structure in c?

A data structure in C is a user-defined type (UDT). To define a UDT, use the keyword struct.


What is the structure of carbon sub-oxide?

Formula is C3O2, structure is:O=C=C=C=O


What is the Lewis structure of C2Br4?

C ___ c


Difference between c structure and c plus plus structure?

The definition of the structure in C is limited to within the module and cannot be initialized outside its scope. Where as in C++ you can initialize the objects anywhere within the boundaries of the project.


What do you mean by non primitive data structure in C programming?

What do you mean by searching in data structure in C.?


Explain the structure of c program with an suitable example?

discuss the structure of c program with suitable example.


Basic control structure available in c plus plus?

The basic control structure in C++ is the if statement.


How to Passing structure reference to function in c?

No references in C, so simply pass the address of the structure.


What is structure and union?

Structure is a query that is used in language c++


Data structure using c?

A data structure in C is simply a user-defined type (UDT). To define a UDT in C, use the keyword struct.


What is the Lewis structure for c2h4?

H-c=c-h


How do you create modules in c language?

by using structure in c.........


CO2 Lewis dot structure?

This is the Lewis structure of carbon dioxide:O::C::OO::C::O


A b c d side of structure?

The a b c d side of a structure at an incident are the exposures or surrounding properties


Why does the structure H-C equals C-H fail to make sense chemically?

because of their structure


Define basic structure of c program?

The basic structure of a C program is documentations, preprocess or statements, then global declarations.


Advantage of structure in c?

dutyutyityi


What is the Lewis Structure of CH3COH?

h3-c-c-o-h


Why c is known as structure programming language?

It is not known as 'structure programming language'.


Which purpose structure is using in c?

structure is a collection of variables of different datatypes.


What is the meaning of nested structure in C plus plus?

A nested structure in any language is a structure within a structure. class A { class B {}; // nested structure };


What are the advantages of a class in C over a structure in C?

There is no advantage because C has no classes. Only C++ has classes.


What has the author C C C Chan written?

C. C. C. Chan has written: 'Design of a structure diagram documentation aid'


Basic structure of c n c plus plus?

The basic structure of a C or C++ program is built around types. A structure is a type. A function is a type. A class is a type. All of these types can be built from primitive (built-in) types and can be used to create ever-more complex types.


What labeled structures controls the water balance in the paramecium?

structure c


Still have questions?