in turboc++
------------------------------------------------------------------------------------------
// program to convert a string into lowercase // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
char *string_lwr(); // function prototype
int main() // main function returning integer value
{
printf("LOWERCASE=%s",string_lwr()); // function calling with output
getch();
return 0; // returning value 0
}
char *string_lwr() // function body
{
char string[100]; // string declaration
printf("enter string\n"); // message declaration
gets(string); // gets string from user
return strlwr(string); //returns string
}
----------------------------------------------------------------------------------------------------
in codeblocks:
-------------------------------------------------------------------------------------------------------
// program to convert a string into lowercase // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
char *string_lwr(); // function prototype
int main() // main function returning integer value
{
printf("LOWERCASE=%s",string_lwr()); // function calling with output
return 0; // returning value 0
}
char *string_lwr() // function body
{
char string[100]; // string declaration
printf("enter string\n"); // message declaration
gets(string); // gets string from user
return strlwr(string); //returns string
}
------------------------------------------------------------------------------------------
// program to convert a string into lowercase // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
char *string_lwr(); // function prototype
int main() // main function returning integer value
{
printf("LOWERCASE=%s",string_lwr()); // function calling with output
getch();
return 0; // returning value 0
}
char *string_lwr() // function body
{
char string[100]; // string declaration
printf("enter string\n"); // message declaration
gets(string); // gets string from user
return strlwr(string); //returns string
}
----------------------------------------------------------------------------------------------------
in codeblocks:
-------------------------------------------------------------------------------------------------------
// program to convert a string into lowercase // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
char *string_lwr(); // function prototype
int main() // main function returning integer value
{
printf("LOWERCASE=%s",string_lwr()); // function calling with output
return 0; // returning value 0
}
char *string_lwr() // function body
{
char string[100]; // string declaration
printf("enter string\n"); // message declaration
gets(string); // gets string from user
return strlwr(string); //returns string
}
No comments:
Post a Comment