Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Plus Plus Language Interviews:C++ Access ControlC++ COM ActiveXC++ ConstructorsC++ ContainersC++ Exception HandlingC++ FriendC++ InheritanceC++ Inline FunctionC++ New And DeleteC++ Operator OverloadingC++ Pointers & FunctionsC++ ProgrammerC++ ReferencesC++ Static DataC++ SyntaxC++ TemplateC++ Type CheckingC++ Virtual Functions
Copyright © 2018. All Rights Reserved
C++ Access Control Interview Question:
Explain Structure in C++?
Submitted by: AdministratorA structure is a collection of variables, referenced under one name, providing a convenient means of keeping related information together. Structure declaration forms a template which can be used to create structure objects. The variables inside a structure are called members. Generally all the members of a structure are logically related. Structure declaration precedes the keyword struct.
Consider following example:
struct address
{
char name[80];
char street[80];
char city[20];
char state[20];
};
Please note the semicolon at the end of structure declaration. This is done because a structure declaration is a statement. The type name of this structure is address. We can create structure variables using:
struct address ad1, ad2;
ad1 and ad2 are two variables of the type struct address..
Submitted by: Administrator
Consider following example:
struct address
{
char name[80];
char street[80];
char city[20];
char state[20];
};
Please note the semicolon at the end of structure declaration. This is done because a structure declaration is a statement. The type name of this structure is address. We can create structure variables using:
struct address ad1, ad2;
ad1 and ad2 are two variables of the type struct address..
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.