answersLogoWhite

0


Best Answer

struct Details

{

string name;

int age;

char gender;

} Stud{"Phumlani", 21, "M"};

User Avatar

Sedrick Sawayn

Lvl 10
1y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you initialize structures?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you initialize variable?

initialize simple types: int i = 0; initialize objects: Object o = null; (in java)


What does initialize mean?

The term "initialize" means to start, begin, or prepare. Often the word "initialize" is used in context with starting something such as a program or sequence.


Why can't java compiler initialize local variables?

Its not that the compiler can't initialize local variables; its that the compiler does not initialize local variables.This is by design and language specification. If you want to initialize local variables, you must explicitly do so.


Do you have to initialize your SIM card?

No - there's no need to initialize it. Simply insert it in the handset for it to work.


Is it possible to initialize null character in string?

yes we can initialize null characterfor example syntax :string='\0';


Which condition is not necessary in dynamic stack?

in dynamic stack we don't have to initialize the size of array while in static stack we have 2 initialize it ......


What is the synonym for initialize?

openget offnovitiatetriggerenlightenbegintake in


What does initialized mean?

The term "initialize" means to start, begin, or prepare. Often the word "initialize" is used in context with starting something such as a program or sequence.


What does it mean to initialize a memory card?

It means to format


How is a structure initialized?

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.


How do you initialize the ignition control unit in a 1986 Volvo 240dl?

Simply switch on the key to initialize and crank the engine to activate. What kind of problem are you having to ask this type question?


Can you initialize an object without constructor in java?

No. if you wish to create an object that you plan on using in a java program then the answer is NO. You cannot initialize an object of a Java class without calling the constructor.