answersLogoWhite

0

You cannot define the size of the structure, but you can query it with sizeof.

The structure size in C language depends on the elements of the structure.

Example:

#include

struct Test

{int v;

char str[100];

};

int main()

{printf("The structure size is %d\n", sizeof(struct Test));

return 0;

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Define C as an object oriented language?

Don't.


What is structure and union?

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


Define a complex number using c structure?

Just define two fields (whatever those are called in "C" - the parts of the structure), one for the real part, one for the imaginary part.Just define two fields (whatever those are called in "C" - the parts of the structure), one for the real part, one for the imaginary part.Just define two fields (whatever those are called in "C" - the parts of the structure), one for the real part, one for the imaginary part.Just define two fields (whatever those are called in "C" - the parts of the structure), one for the real part, one for the imaginary part.


How do you create modules in c language?

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


Can you define a function within a structure?

No, it is the other way around: you can define a structure within a function.In C++ though, structs are actually classes, so they can have methods.


How can define date data type in c structure?

struct tm can be an example.


Why is c called a structured language?

a synonym for structure language in "Comb-sturctured" languages. C in comb.


Define the role of printf and scanf in c language?

to write and read the values


What is preprocessor derective in C language?

#if, #define, #include just to name a few


When you can use percent D in c language?

To define any integer type value.


How can override the precedence define by c language?

Not possible; use (brackets) instead.


Define the role of C programming in the development of software?

All operating system are made using c-based language.