Answers for "how to check char array == to in c++"

C++
1

c++ length of char array

char* example = "Lorem ipsum dolor sit amet";
int length = strlen(example);
std::cout << length << '\n'; // 26
Posted by: Guest on January-24-2021
0

c++ char array size

const char* Coffee = "Nescafe";

for(int i = 0; i < strlen(Coffee); i++)
{
    std::cout << Coffee[i] << "\n";
}
Posted by: Guest on October-28-2021

Browse Popular Code Answers by Language