C++ String Length Example

#include <iostream>
#include <cstring>

int main() {
    char str[] = "Hello, World!";
    int length = std::strlen(str);

    std::cout << "Length of the string: " << length << std::endl;

    return 0;
}