Thanks to you guys both Matticus and Laselight, thanks for the recommendation tho'. i have succesfully understand the basic concept of this <cstring> and strlen(), its quite pretty easy actually
Code:
#include <htc.h>
#include <xlcd.h>
#include <delays.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <cstring>
int main()
{
const char str[] = "abcde"; // which have 5 letter
printf("Without NULL = %d \n",strlen(str)); // will show 5 byte is use
printf("With NULL = %d",sizeof str); // will show only 5 byte is use including NULL
return 0;
}
The Output is
Code:
Without NULL = 5
With Null = 6
one more thing, this coding just use #include <iostream> and #include <cstring>, the others is just for my use