LIII.
Write a program in C-language by using standard function which makes
one string by joining two separate strings. State also the output that will
appear on running the program.
17thanames of main elements of computer network and describe
Answers
Answered by
3
Answer:
#include <stdio.h>
int main() {
char s1[100] = "programming ", s2[] = "is awesome";
int i, j;
// length of s1 is stored in i
for (i = 0; s1[i] != '\0'; ++i) {
printf("i = %d\n", i);
}
// concatenating each character of s2 to s1
for (j = 0; s2[j] != '\0'; ++j, ++i) {
s1[i] = s2[j];
}
// terminating s1 string
s1[i] = '\0';
printf("After concatenation: ");
puts(s1);
return 0;
}
out put
After concatenation: programming is awesome
Similar questions
English,
5 months ago
Hindi,
5 months ago
Business Studies,
5 months ago
Social Sciences,
11 months ago
Math,
11 months ago
Science,
1 year ago