Lesson 9 – String Functions

String is not a special structure but just a character type array. It is initialized the same way as an array but only the data type is changed. Like,

char str[10];

This is a string initialization.

However, the initialization is the same as the arrays but there are dedicated functions that make strings easy to work with.

gets() is used to take input in a string and puts() is used to print the contents of the strings without using loop.

You need to include the header file “string.h” to use string functions. There are many other functions of strings that make working with strings easy and fun.