Write a program to string uppercase( ) function


 

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

#include<iostream.h>

#include<conio.h>

#include<string.h>

void main()

{

char a[10];

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);

getch();}

/* output:

enter name=raman

length of string=5

uppercase=RAMAN

lowercase=raman*/

Related Posts

Comments are closed.