points to remember string is null-terminated character array individual characters of strings can be accessed using subscript that starts from zero all the characters of string are stored in successive memory locations strings can be read by user using three waysusing scanf(functionusing gets(functionor using getchar(function repeatedly the scanf(function terminates as soon as it finds blank space the gets(function takes the starting address of the string which will hold the input the string inputted using gets(is automatically terminated with null character strings can also be read by calling getchar(repeatedly to read sequence of single characters strings can be displayed on the screen using three waysusing printf functionusing puts(functionor using putchar()function repeatedly standard library supports number of pre-defined functions for manipulating strings or changing the contents of strings many of these functions are defined in the header file string alternatively we can also develop functions which perform the same task as the pre-defined string handling functions the most basic function is the length function which returns the number of characters in string name of string acts as pointer to the string in the declaration char str[ "hello"str is pointer which holds the address of the first characteri 'han array of strings can be declared as char strings [ ][ ]where the first subscript denotes the number of strings and the second subscript denotes the length of every individual string exercises review questions what are stringsdiscuss some of the operations that can be performed on strings explain how strings are represented in the main memory how are strings read from the standard input deviceexplain the different functions used to perform the string input operation explain how strings can be displayed on the screen explain the syntax of printf(and scanf( list all the substrings that can be formed from the string 'abcd what do you understand by pattern matchinggive an algorithm for it write short note on array of strings explain with an example how an array of strings is stored in the main memory explain how pointers and strings are related to each other with the help of suitable program if the substring function is given as substring (stringpositionlength)then find ( if "welcome to world of programming if the index function is given as index(textpattern)then find index(tpwhere "welcome to world of programmingand "of differentiate between gets(and scanf( give the drawbacks of getchar(and scanf( which function can be used to overcome the shortcomings of getchar(and scanf() how can putchar(be used to print string differentiate between character and string differentiate between character array and string programming exercises write program in which string is passed as an argument to function write program in to concatenate first characters of string with another string write program in that compares first characters of one string with first characters of another string write program in that removes leading and trailing spaces from string write program in that replaces given character with another character in string