Horje
c++ char array size Code Example
c++ length of char array
char* example = "Lorem ipsum dolor sit amet";
int length = strlen(example);
std::cout << length << '\n'; // 26
c++ length of char*
#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    char *str = "ABC";
    cout << strlen(str) << endl;
    return 0;
}
char size length c++
char* a = "ABC";
int length = sizeof(a)/sizeof(char);
c++ char array size
const char* Coffee = "Nescafe";

for(int i = 0; i < strlen(Coffee); i++)
{
    std::cout << Coffee[i] << "\n";
}




Cpp

Related
++ how to write quotation mark in  a string Code Example ++ how to write quotation mark in a string Code Example
what is a .cpp file Code Example what is a .cpp file Code Example
c++ iterate over vector of pointers Code Example c++ iterate over vector of pointers Code Example
unique_ptr syntax Code Example unique_ptr syntax Code Example
initialize string with length c++ Code Example initialize string with length c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10