StrCat - ++ i ; ++ j ; } s3[j] = 0 ; } int main() { char...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <iomanip> using namespace std; void concat(char s1[], char s2[], char s3[], int size) { int i = 0 ; while (s1[i] != 0) { s3[i] = s1[i] ; ++ i ; } int j = i - 1 ; i = 0 ; while (s2[i] != 0) { s3[j] = s2[i] ;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ++ i ; ++ j ; } s3[j] = 0 ; } int main() { char first = &quot;Eric&quot; ; char last = &quot;Van Wyk&quot; ; char full[50] ; concat(first,last,full,50) ; cout &lt;&lt; &quot;My full name is: &quot; &lt;&lt; full &lt;&lt; &quot;.&quot; &lt;&lt; endl ; }...
View Full Document

Ask a homework question - tutors are online