Answers for "c length of char*"

C++
3

c++ length of char*

#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    char *str = "ABC";
    cout << strlen(str) << endl;
    return 0;
}
Posted by: Guest on August-01-2020
0

char size length c++

char* a = "ABC";
int length = sizeof(a)/sizeof(char);
Posted by: Guest on July-05-2020
-1

C program to find no of chars

Total number of characters in a string: 19
Posted by: Guest on June-07-2021

Code answers related to "c length of char*"

Browse Popular Code Answers by Language