Check out example codes for "primitive and non primitive data types in c++". It will help you in understanding the concepts better.

Code Example 1

Primitive data types are those data types which are used by programmers when creating variables in their program. 
For example :-
    * boolean
    * char
    * byte
    * short
    * int
    * long
    * float
    * double
Non-Primitive data types:
    * String
    * array
    * enum
    * class
    * etc

Learn ReactJs, React Native from