edited by
438 views
0 votes
0 votes
#include<string.h>
#include<stdio.h>
int main()
{
    char str[13]="C at lakshya";
    char str1[]="secret";
    strcat(str,str1);
    printf("%d %d",sizeof(str),strlen(str));
}

Output :- $13$ $18$

Here although sizeof str is $13$ then also it is concatenating why ?

edited by

1 Answer

Related questions