What does the struct keyword allow a C++ programmer to do? 

  • Execute a set of statements repeatedly 
  • Connect to databases 
  • Create a group of variables under one name 
  • Create a virtual function
The struct keyword in C++ allows a programmer to define a composite data type that groups variables of different data types under a single name. This makes it easier to organize related data. Initially in C, struct was used to define a simple group, but in C++ it's similar to a class.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *