structures can be passed by reference.
they can be returned as pointers.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
All declarations inside a structure are by default public, while all members inside a class are private
Create Date
:
Thursday, April 03, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
false: arrays are more appropriate for the elements of the same type
Create Date
:
Tuesday, April 01, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
We can define structure bit field members with Dot operators.
EXAMPLE:
#include <stdio.h>
int main()
{ Struct bit_field
{ Int x.4; // it allocates only 4 bits to x
Char C.6; // it allocates only 6 bits to C;
};
return 0;
}
Create Date
:
Sunday, March 16, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
with the help of function modules ie., write_messages or format_messages we can store errors.
Create Date
:
Sunday, March 16, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
They are different. C struct can only contain data while C++ struct can contain functions and access limitation such as public, private etc just as a class (not totally the same as class!).
Create Date
:
Saturday, March 15, 2008
Click here
to improve the Interview Question, Answer and other fields.