Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336 Point out the error in the following program. #include<stdio.h> #include<string.h> int main() { char str1[] = "Learn through IndiaBIX\0.com", str2[120]; char p; p = (char) memccpy(str2, str1, 'i', strlen(str1)); p = '\0'; printf("%s", str ?->(Show Answer!)
1. Point out the error in the following program. #include<stdio.h> #include<string.h> int main() { char str1[] = "Learn through IndiaBIX\0.com", str2[120]; char p; p = (char) memccpy(str2, str1, 'i', strlen(str1)); p = '\0'; printf("%s", str2); return 0; }
Ask Your Doubts Here
Comments
By: guest on 01 Jun 2017 06.02 pm
Declaration:
void *memccpy(void *dest, const void *src, int c, size_t n); : Copies a block of n bytes from src to dest With memccpy(), the copying stops as soon as either of the following occurs:
=> the character 'i' is first copied into str2
=> n bytes have been copied into str2
void *memccpy(void *dest, const void *src, int c, size_t n); : Copies a block of n bytes from src to dest With memccpy(), the copying stops as soon as either of the following occurs:
=> the character 'i' is first copied into str2
=> n bytes have been copied into str2