Shortened the c program of week 10

#include<stdio.h>
int main()
{
int i,j;
char name[20]={“everybody”};
char sub[20]={“hello”};
printf(“enter the position to be entered into the main string\n”);

for(i=0,j=4;i<5;i++,j++){
name[j]=sub[i];
}
printf(“the stirng after insterting is\n %s\n”,name);
return 0;
}

 

This program has benn written in book in a long way

so thought to modify it

 

Advertisements