🎴 Flashcard Mode
C Programming Fundamentals
Card1 / 19
Mastered0
Review0
QuestionClick to flip
What would be the output of the following program?
main()
{
char *str,*str1="I Love You";
str=malloc(strlen(str1));
strcpy(str,str1);
printf("%s",str);
free(str);
}
AnswerClick to flip back
A
malloc() fails