

Library Functions - Programming
Q1: Point out the error in the following program.
#include<stdio.h>
#include<string.h>
int main()
{
char str1[] = "Learn through AptitudeCrack\0.com", str2[120];
char *p;
p = (char*) memccpy(str2, str1, 'i', strlen(str1));
*p = '\0';
printf("%s", str2);
return 0;
}
A Error: in memccpy statement
B Error: invalid pointer conversion
C Error: invalid variable declaration
D No error and prints "Learn through Indi"
ANS:D - No error and prints "Learn through Indi" Declaration: |


For help Students Orientation
Mcqs Questions
One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.