main() { char *q; iny j; q=(char*)macclo(20*sizeof(char)); for(i=0;i<3;i++)scanf("%s",(q+i)); for(i=0;i<3;i++)printf("%c",*(q+i)); for(i=0;i<3;i++)printf("%s",(q+i)); } please send me the output and its explanation.
The code is totally messed up! Here's the corrected code :- Code: #include<stdio.h> int main() { char *q; int i; q=(char*)malloc(20*sizeof(char)); for(i=0;i<3;i++)scanf("%s",(q+i)); for(i=0;i<3;i++)printf("%c",*(q+i)); for(i=0;i<3;i++)printf("%s",(q+i)); system("pause"); return(0); } Output :- Code: 1 2 3 123123233