how to copy three charaters of a string of strg2[] into strg1[]
Printable View
how to copy three charaters of a string of strg2[] into strg1[]
Use a for loop and assignment, srg[i] = strg1[i]. If the two arrays aren't "in synch" with each other, use [i] and [j] to keep them working OK.
Code:strg1[0] = strg2[0];
strg1[1] = strg2[1];
strg1[2] = strg2[2];
> how to copy three charaters of a string of strg2[] into strg1[]
Tell us your approach, and ask us to validate / comment on it.
Because you've posted three "exam" questions in the last couple of hours, and all of a sudden, it looks like we're the ones passing your exam for you.