Tuesday, 7 January 2014

COMB THE TWO STRING AND PRINT IN UPP CASE

COMB THE TWO STRING AND PRINT IN UPP CASE

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
COMB THE TWO STRING AND PRINT IN UPP CASE



No comments:

Post a Comment