using turbo c++
---------------------------------------------------------------------------
//WAP to convert a string into lowercase using(strlwr()) function.
#include <stdio.h>
#include<string.h>
#include<conio.h>
int main()
{
char name[100];//declaration
printf("enter string\n");
//fgets(name, sizeof (name), stdin);//to input string with space
scanf("%[^\n]s",name); //it also CAN BE USED. IT accepts string with space until it meets new line
strlwr(name);
printf("string in lowercase=%s\n",name);//prints the name in lowercase
getch();
return 0;
}
--------------------------------------------------------------------------------------------------
using codeblocks
----------------------------------------------------------------------------------------------------------
//WAP to convert a string into lowercase using(strlwr()) function.
#include <stdio.h>
#include<string.h>
int main()
{
char name[100];//declaration
printf("enter string\n");
//fgets(name, sizeof (name), stdin);//to input string with space
scanf("%[^\n]s",name); //it also CAN BE USED. IT accepts string with space until it meets new line
strlwr(name);
printf("string in lowercase=%s\n",name);//prints the name in lowercase
return 0;
}
---------------------------------------------------------------------------
//WAP to convert a string into lowercase using(strlwr()) function.
#include <stdio.h>
#include<string.h>
#include<conio.h>
int main()
{
char name[100];//declaration
printf("enter string\n");
//fgets(name, sizeof (name), stdin);//to input string with space
scanf("%[^\n]s",name); //it also CAN BE USED. IT accepts string with space until it meets new line
strlwr(name);
printf("string in lowercase=%s\n",name);//prints the name in lowercase
getch();
return 0;
}
--------------------------------------------------------------------------------------------------
using codeblocks
----------------------------------------------------------------------------------------------------------
//WAP to convert a string into lowercase using(strlwr()) function.
#include <stdio.h>
#include<string.h>
int main()
{
char name[100];//declaration
printf("enter string\n");
//fgets(name, sizeof (name), stdin);//to input string with space
scanf("%[^\n]s",name); //it also CAN BE USED. IT accepts string with space until it meets new line
strlwr(name);
printf("string in lowercase=%s\n",name);//prints the name in lowercase
return 0;
}
No comments:
Post a Comment