String

STRING

String are the combination of number of characters these are used to store any word in any variable of constant. A string is an array of character. It is internally represented in system by using ASCII value. Every single character can have its own ASCII value in the system. A character string is stored in one array of character type.

char name [25].

we store any value in name variable then it can hold only 24 character because at the end of the string one character is consumed automatically by ‘\0’.

#include<string.h>

There are some common inbuilt functions to manipulation on string in string.h file. these are as follows:

  1. strlen – string length
  2. strcpy – string copy
  3. strcmp – string compare
  4. strups – string upper
  5. strlwr – string lower
  6. strcat – string concatenate
error: Content is protected !!