The ones who are crazy enough to think they can change the world are the ones who do.- Steve Jobs
You will need to use character strings in most of your program - names, address, state, district and so on. Thus understanding about strings in C programming is necessary. The following four points are good enough to make use of strings
char str[12] = "ThisisString";
#include <stdio.h> int main() { char nation[20] = "2Braces India"; printf("%s", nation); return 0; }
The program prints the string stored in a variable 'nation'. The above program don't require the header file "string.h", because there is no string functions.
We have already made extensive use of string literals for output. Just about every time the printf() method or function was used in the above example too, we used a string literal as the argument. A string literal is nothing more than a sequence of characters between double quotes.
"This is a string literal"
We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.
© Copyright 2019