Here\'s my code
#include
#include
int main(){
char pal[8] = \"ciaooaic\";
char pal1[7] = \"ciaoaic\";
int lenPa
Both the above answers are sufficient to solve your doubts. Increase the the length of both pal and pal1 by one as there there is no space for the assignment of the null character( '\0') at the end. However there is small trick to print the non null terminated character using printf
printf("strlen('%.*s'): %d\n",8, pal, lenPal);
printf("strlen('%.*s'): %d\n",7, pal1, lenPal1);
Link for the above trick:BRILLIANT