MCQOPTIONS
Saved Bookmarks
| 1. |
Point out the error in the following program._x000D_ #include_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ char str1[] = "Learn through IndiaBIX\0.com", str2[120];_x000D_ char *p;_x000D_ p = (char*) memccpy(str2, str1, 'i', strlen(str1));_x000D_ *p = '\0';_x000D_ printf("%s", str2);_x000D_ return 0;_x000D_ } |
| A. | Error: in memccpy statement |
| B. | Error: invalid pointer conversion |
| C. | Error: invalid variable declaration |
| D. | No error and prints "Learn through Indi" |
| Answer» E. | |