Question is :
Get two strings from user. Join first string with the second string with a space. Store in another string and display it.
Example:
Enter first string: Hello
Enter second string: World
Hello World
(built in function for string concatenation is not allowed)
im newbie in c++ and arrays please tell me whats the problem in my code
Code:#include<iostream.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); char a[100]; char b[100]; char c[200]; int s; cin.getline(a,100); cin.getline(b,100); for (s=1;c[s]!=NULL;s++) { c[s]=a[s]+b[s]; } puts(c); getch(); }



LinkBack URL
About LinkBacks



