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.


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.


What is structure and union?

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


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.


Why is c called a structured language?

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


How can define date data type in c structure?

struct tm can be an example.


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 do you make record file in c language?

To create a record file in C, you typically define a structure to represent the record data, then use file handling functions to write to a file. First, include the necessary headers like <stdio.h> and define your structure. Use fopen() to open a file in write mode, and then use fwrite() or fprintf() to write the structure data to the file. Finally, close the file with fclose() to ensure all data is saved properly.


How can override the precedence define by c language?

Not possible; use (brackets) instead.