COMB THE TWO STRING AND PRINT IN UPP CASE
In the below program, we combined two string and print in upper case
OUTPUT
In the below program, we combined two string and print in upper case
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char *ch1="hitesh ";
char *ch2="kumar";
char *ptr;
clrscr();
printf("\n\n1 ST STRING = %s",ch1);
printf("\n\n2 ND STRING = %s",ch2);
strcat(ch1,ch2);
printf("\n\nSTRING IS = %s",ch1);
ptr=strupr(ch1);
printf("\n\nIN UPPER CASE = ");
printf("%s",ptr);
getch();
}
OUTPUT
No comments:
Post a Comment