difference between structure and union.

Answer Posted / truong nguyen

Regarding the struct, each item in the struct is allocated
in a separated memory. And the size of a struct object is
total size of all its items.
But with the union, all its items are in the same memory.
And the size of an union object is size of its item which
has largest size.

Is This Answer Correct ?    24 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write string class as your own class in java without using any built-in function

1976


What is and I oop mean?

616


hi all..i want to know oops concepts clearly can any1 explain??

1681


What are the benefits of oop?

604


Can you inherit a private class?

631






What is the oops and benefits of oops programming?

549


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2574


i got a backdoor offer in process global,Bangalore..Can i work with it?

2324


What do you mean by Encapsulation?

640


What is the difference between procedural programming and oops?

550


What is overriding vs overloading?

580


What polymorphism means?

620


What is the types of inheritance?

602


What is overriding in oops?

601


What is the advantage of oop over procedural language?

625