
Strings and Standard
Functions
1. What is a string? How it is declared?
Ans: A string is an array of characters. String can be declared with character array. It can also be
declared with string pointer. To manipulate text such as words and sentences, normally strings are used.
Every string is terminated with ‘\0’ character or NULL. The NULL is a byte with all bits at logic zero.
The value of the string is its base address, i.e., address of the first character. When a string is created, a
few compilers place the string in the memory where it cannot be modified.
A string can be defined as follows:
char name[]={'I','N','D','I','A','\0'};
2. Which format specif ...