COPY THE FIRST STRING INTO SECOND STRING
Below we write code for copy first string into second string in C#include<stdio.h>
#include<conio.h>
#include<string.h>
void string(char *ch1 ,char *ch2);
void main()
{
char *ch1[5];
char *ch2="kumar";
clrscr();
printf("\n\nSTRING = %s",ch2);
string(ch1,ch2);
getch();
}
void string(char *ch1 ,char *ch2)
{
strcpy(ch1,ch2);
strupr(ch1);
printf("\n\nSTRING IS = ");
printf("%s",ch1);
}
OUTPUT
No comments:
Post a Comment