1char* example = "Lorem ipsum dolor sit amet";
2int length = strlen(example);
3std::cout << length << '\n'; // 26
1Instead of sizeof() for finding the length of strings or character
2arrays, just use strlen(string_name) with the header file
3#include <cstring>
4it's easier.