Read OnLine Cpp Program Example
8 - STRING | |
---|---|
PRAC 3 | PRAC 4 |
//strcat() function in c //it concatenates two strings #include<iostream.h> #include<conio.h> #include<string.h> void main() { char source[]="Education"; char target[20]="Imacc"; clrscr(); strcat(target,source); cout<<"\n Source String="<<source; cout<<"\n Target String="<<target; getch(); } -------output-------- Source String=Education Target String=ImaccEducation |
//strupr(),strlwr() function in c //it convert string to uppercase //it convert string to lowercase #include<iostream.h> #include<conio.h> #include<string.h> void main() { char s[]="Imacc Education"; clrscr(); cout<<"\n Source String="<<strupr(s); cout<<"\n Source String="<<strlwr(s); getch(); ; } ------output------- Source String=IMACC EDUCATION Source String=imacc education |
Previous | Next |
Download | Download |