Write a program to string concat( ) function


 

/* Write a program to string concat( )  function*/

#include<iostream.h>

#include<conio.h>

#include<string.h>

void main()

{

char a[10],b[]=”city”;

clrscr();

cout<<“enter name=”;

cin.get(a,10);

int length=strlen(a);

cout<<“length of string=”<<length;

cout<<endl<<“uppercase=”<<strupr(a);

cout<<endl<<“lowercase=”<<strlwr(a);

cout<<endl<<“strcat=”<<strcat(a,b);

getch();

}

/* output:

enter name=ajay

length og string=4

uppercase=AJAY

lowercase=ajay

strcat=ajaycity*/

Related Posts

Comments are closed.