0

related to string

our first string is 6 bytes,and using memcpy func we are copying it more than 6bytes still its working. just watch this code #include <stdio.h> #include<string.h> int main() { char str[6]="sandip"; char str1[]="qwertyuio"; memcpy(str,str1,sizeof(str1)); //printf("%ld,%ld",sizeof(str),sizeof(str1)); printf("%s",str); } op:qwertyuio

18th Aug 2022, 3:03 PM
Sandip Doke
1 Answer
0
Read proper question.
18th Aug 2022, 4:14 PM
Sandip Doke