String
#include <string.h>
Character Array
char name[] = "Danny";char day[] = {'2', '4', '-', '0', '7', '-', '2', '0', '2', '0', '\0'};int i = 0;
while (day[i] != '\0') {
// i++ is post-increment,
// that means it returns the original value of i,
// before adding 1 to i
printf("%c", day[i++]);
}
printf("\n");strlen()
strcpy()
strcmp()
Last updated