These two data types are important for the performance of the applications. Built in data types like int, float, double and user defined structure are value types. Value type is stored in stack of the memory.
String data type is the execption that it is reference type. Additionally instance of a class or an array are the reference types. Reference types are stored in heap of the memory.
For the performance issues using stack is more effient. However, value types have limited lifetime, so using stack may not be convenient for data sharing between different classes. Using heap has advantage for sharing the data between classes.