Program for string copy of required number of characters into another string

#include<stdio.h> #include<conio.h> #include<string.h> void main() { char s1 [20], s2 [20]; printf (“enter s...

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s1 [20], s2 [20];
printf (“enter string”);
gets ( s1);
strncpy ( s1,s2,5);
puts (s2);
getch();
}



out put:
enter string radhika
radhi

Related

C Programs 7713689965792994626

Post a Comment

emo-but-icon

item