#include <iostream>
using namespace std;
int main()
{
char arr[] = "grepper";
cout << sizeof(arr) << endl;
return 0;
// keep it in mind that character arrays have length of one more than your characters because last one is for to show that word has ended
}
char* example = "Lorem ipsum dolor sit amet";
int length = strlen(example);
std::cout << length << '
'; // 26
Instead of sizeof() for finding the length of strings or character
arrays, just use strlen(string_name) with the header file
#include <cstring>
it's easier.