String Functions
C also has many useful string functions, which can be used to perform certain operations on strings.
To use them, you must include the <string.h>
header file in your program:
#include <string.h>
C also has many useful string functions, which can be used to perform certain operations on strings.
To use them, you must include the <string.h>
header file in your program:
#include <string.h>
Strings are used for storing text/characters.
For example, “Hello World” is a string of characters.
Unlike many other programming languages, C does not have a String type to easily create string variables. Instead, you must use the char
type and create an array of characters to make a string in C:
char greetings[] = “Hello World!”;
Note that you have to use double quotes (""
). Continue reading C Strings