Q:

WHAT IS THE DIFFERENCE BETWEEN ARRAY AND STRING IN C?

belongs to collection: C INTERVIEW QUESTIONS AND ANSWERS

0

WHAT IS THE DIFFERENCE BETWEEN ARRAY AND STRING IN C?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

total answers (1)

C INTERVIEW QUESTIONS AND ANSWERS

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
WHAT IS POINTER IN C?... >>
<< CAN ARRAY SUBSCRIPTS HAVE NEGATIVE VALUE IN C?...