What is the other name of declaration of structure ?
Structure creator
Structure signifier
Structure specifier
None of these
What is the speciality of structure member over class member ?
Structure member are secure.
Private by default.
Public by default.
Reusable
What is the use of structures in C++ ?
Provides a way to bind data and function together.
Provides a way to group data elements.
Provides a way to break the data elements into functions.
Provides a way to allocate data elements.
Which of the following can be a definition for structure ?
Literal
User defined variable
Pre defined variable
User defined data type
Which of the following accesses a variable in structure *b ?
b->var;
b.var;
b-var;
b>var;
What is the use of structure definition ?
It create structure variables.
It create structure tag.
It create structure definition.
It create structure member.
Which is the most efficient method of dealing with structure variable ?
Define the structure globally.
Define the structure locally.
Define the structure externally.
None of the above
What is the syntax for accessing a structure member ?
Structvar::member name
Structvar.member name
Strvar;member name
Strvar::member name
What will be the output of this program ?
# include
using namespace std;
int main ( )
{
struct ShoeType {
char style;
double price;
};
ShoeType shoe1,shoe2;
shoe1.style='Adidas';
shoe1.price=9.99;
cout<
shoe2=shoe1;
shoe2.price=shoe2.price/9;
cou<
return 0;
}
Adidas $9.99
Adidas $1.11
Adidas $9.11
Adidas $11.11
None of the mentioned
What is nested structure ?
Structure within a structure
Looped structure
Structure lader
Iterative structure