Go to w3schools.com
Close the exercise
More C++ Exercises
Close menu
Go to w3schools.com
Sign in to track your progress
×
Sign in

C++ Exercises

Syntax6 q
Statements5 q
Output Text4 q
Output Numbers3 q
New Lines5 q
Comments4 q
Variables6 q
Multiple Variables5 q
Identifiers4 q
Constants4 q
User Input5 q
Data Types5 q
Numeric Data Types4 q
Boolean Data Types4 q
Character Data Types6 q
String Data Types6 q
The auto Keyword5 q
Arithmetic Operators6 q
Assignment Operators5 q
Comparison Operators5 q
Logical Operators6 q
Strings5 q
String Concatenation5 q
Numbers and Strings5 q
String Length5 q
Access Strings7 q
Special Characters4 q
User Input Strings5 q
String Namespace3 q
C-Style Strings5 q
Math7 q
Booleans7 q
Boolean Expressions5 q
If5 q
Else6 q
Else If5 q
Short Hand If Else4 q
Switch5 q
While Loop6 q
Do/While Loop5 q
For Loop5 q
Nested Loops5 q
The foreach Loop4 q
Break and Continue6 q
Arrays5 q
Arrays and Loops5 q
Omit Array Size4 q
Get Array Size6 q
Multi-Dimensional Arrays5 q
Structures6 q
Enums4 q
References3 q
Memory Address4 q
Pointers3 q
Dereference3 q
Modify Pointers3 q
Functions4 q
Function Parameters5 q
Default Parameters3 q
Multiple Parameters3 q
Return Values5 q
Pass By Reference3 q
Pass Arrays3 q
Function Overloading3 q
Scope4 q
Recursion3 q
OOP5 q
Classes and Objects6 q
Class Methods5 q
Constructors4 q
Access Specifiers9 q
Encapsulation6 q
Inheritance6 q
Multilevel Inheritance4 q
Multiple Inheritance4 q
Inheritance Access3 q
Polymorphism4 q
Files6 q
Exceptions7 q
Date3 q
Data Structures and STL8 q
Vectors8 q
List7 q
Stacks5 q
Queues7 q
Deque7 q
Sets7 q
Maps7 q
Iterators4 q
Algorithms7 q


by w3schools.com











Exercise: C++ Structures





Wrong Answer!













Completed

You have already completed these exercises!

Do you want to take them again?










×
Close the exercise

Congratulations!


You completed the C++ Structures Exercises from W3Schools.com



Share on:






Drag and drop the correct keyword to define an integer member named age in the structure.

struct Person {
  string name;
   ;
};
age
num
int
double
string
count
value