Question is :
Get two strings from user. Join first string with the second string with a space. Store in another string and display it.
Enter first string: Hello
Enter second string: 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 :(
I am not sure why you needed the clrscr(); so i removed it, but otherwise here is the modified code with some comments, any questions, feel free to ask :)
int s, i; // i is defined for the entire block
for (s = 0, i = 0; s < strlen(a); s++, i++) // strlen() determines length of string
c[i]=a[s]; // set c = a for each character
for (s = 0;c[i]!=NULL; s++, i++)
c[i]=b[s]; // continue where first for loop left off and store c += b
one thing whats strlen condition is doing in loop? and in problem statement it is stated that built in function for string concatenation is not allowed.. so im not sure to add this function is allowed or not :(..so is there is any alternate method without using strlen function?.. plus there should be a space between both strings..
first string user entered: Hello
2nd string: World
new string should be: Hello World
i.e space between two strings not like this HelloWorld
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...