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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s