C++ program to find the length of a given string
codeaft.cpp
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
    cout<<strlen("Codeaft")<<"\n";
}
Output
codeaft@codeaft:~$ g++ codeaft.cpp
codeaft@codeaft:~$ ./a.out 12 codeaft@codeaft:~$
C++ program to find the length of a given string
codeaft.cpp
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
    cout<<strlen("Codeaft\0")<<"\n";
}
Output
codeaft@codeaft:~$ g++ codeaft.cpp
codeaft@codeaft:~$ ./a.out 12 codeaft@codeaft:~$
Comments and Reactions