#include<stdio.h> void concatenate_string(char*, char*); main() { char original[100], add[100]; printf("Enter source string\n"); gets(original); printf("Enter string to concatenate\n"); gets(add); concatenate_string(original, add); printf("String after concatenation is \"%s\"\n", original); return 0; } void concatenate_string(char *original, char *add) { while(*original) original++; while(*add) { *original = *add; add++; original++; } *original = '\0'; }
Hay friends .. AREA OF LANGUAGE IS TOO WIDE BUT NOW APPROXIMATE THEORY AND "C PROGRAMING CODES" ARE AVAILABLE . GOPAL KRISHNA "CHAUHAN"
Thursday, 20 September 2012
sring concatenation without strcat
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment