WHAT IS THE DIFFERENCE BETWEEN ARRAY AND STRING IN C?
Array can hold any of the data types. But, string can hold only char data type.
Array size must be a constant value. So, array size can’t be changed once declared. But, string size can be modified using char pointer.
Array is not ended with null character by default. But, string is ended with null (‘\0’) character by default.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Array can hold any of the data types. But, string can hold only char data type.
Array size must be a constant value. So, array size can’t be changed once declared. But, string size can be modified using char pointer.
Array is not ended with null character by default. But, string is ended with null (‘\0’) character by default.
need an explanation for this answer? contact us directly to get an explanation for this answer