how can i find a length of a string using data type " char " i tried it many time but i did not work . i also see cplusplus tutorial but could not fix example under below
#include <stdio.h>
#include <iostream>
#include<string>
using namespace std;
int main() {
char str1[80];
char str2[80];
cout << "Enter string 1 : ";
cin.getline(str1,80); cout << endl;
cout << "Enter string 2 : ";
cin.getline(str2,80);cout << endl;
cout << "String 1 is :-> " << (unsigned)strlen(str1) << endl;
cout << "String 1 is :-> " << (unsigned)strlen(str2) << endl;
}