#include<stdio.h>
#include<string.h>
int main()
{
int n;
char anik[50], rob[50];
printf("Enter First String : ");
gets(anik);
printf("Enter Second String : ");
gets(rob);
printf("Enter Number which Number is add in First String : ");
scanf("%d", &n);
strncat(anik, rob, n);
printf("After Adding : ");
printf("%s\n", anik);
return 0;
}
#include<string.h>
int main()
{
int n;
char anik[50], rob[50];
printf("Enter First String : ");
gets(anik);
printf("Enter Second String : ");
gets(rob);
printf("Enter Number which Number is add in First String : ");
scanf("%d", &n);
strncat(anik, rob, n);
printf("After Adding : ");
printf("%s\n", anik);
return 0;
}
Comments
Post a Comment