Here is my code:
Code://Programming in C /* * * @author Dushyant Kaushik * */ #include <stdio.h> #include <stdlib.h> int main(void) { system("clear"); char s1[100], s2[100], i; printf("Enter string s1: "); scanf("%s", s1); for (i = 0; s1[i] != '\0'; ++i) //I storing integer while declared as char data type { s2[i] = s1[i]; } s2[i] = '\0'; //What's the importance of this line? printf("String s2: %s", s2); getchar(); return 0; }