answersLogoWhite

0

In C, structures are uninitialized by default. To initialize a structure you will typically zero the memory allocated to the structure and then set specific members to specific values. If all members are non-zero, you can simply set those members rather than zero the memory first.

In C++, structures are initialized via inline initializes and/or through the class constructor.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Which variable has been initialized?

To determine which variable has been initialized, you would need to look at the code or context in which variables are defined. An initialized variable is one that has been assigned a value at the time of its declaration. For example, in Python, a variable like x = 5 is initialized because it has been given a specific value. If you provide a specific code snippet or context, I can help identify the initialized variable.


What do you mean by initialization in c plus plus?

Not initialized variable: int myInt; Initialized variable: int myInt = 10;


Can array be initialized if they are static?

Yes.


Are variables automatically initialized by Java if the programmer does not?

no


Are initialized words first alphabetically?

yes


What is the value of the un initialized pointers?

Random garbage, obviously. Let's note that global (ie not automatic) variables are automatically initialized by zero (=NULL)


How can a PHP static be initialized?

PHP static can only be initialized using a literal or constant. You can not use an expression. You can initialize it to an integer but you may not to another variable.


What value cannot be changed once it is initialized?

A constant value.


Which variable is initialized once when program is compiled?

global and static


Why do you use superclass init method inside your init method in a servlet?

Because, that is how all Java classes work. When a class is initialized/created all the classes it extends from (its super classes) need to be initialized as well.


What happens if you don't initialize an instance variable of any of the primitive type in java?

Java by default initializes it to the default value for that primitive type. Thus an int will be initialized to 0(zero), a Boolean will be initialized to false.


What is finalizer in java?

Finalizes variables so they can't be changed after being initialized.