Q:

What is the output of the C program with strings ?? int main() { char str1[]="JOHN"; char str2[20]; str2= str1; printf("%s",str2); return 0; }

A) JOHN B) J
C) JOHN D) Compiler error
 

View Answer Explanation

Category: C Language MCQ
Sub Category: Strings

32