using codeblocks
-------------------------------------------------------------------------------------------------
// program to reverse a string // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
void string_reverse(); // function prototype
int main() // main function returning integer value
{
string_reverse(); // function calling
return 0; // returning value 0
}
void string_reverse() // function body
{
char string[100]; // string declaration
printf("enter string"); // message declaration
gets(string); // gets string from user
strrev(string); // reverses the string and stores in memory
puts(string); // displays that reversed string
}
-------------------------------------------------------------------------------------------------
// program to reverse a string // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
void string_reverse(); // function prototype
int main() // main function returning integer value
{
string_reverse(); // function calling
return 0; // returning value 0
}
void string_reverse() // function body
{
char string[100]; // string declaration
printf("enter string"); // message declaration
gets(string); // gets string from user
strrev(string); // reverses the string and stores in memory
puts(string); // displays that reversed string
}
---------------------------------------------------------------------------------------------------
using Turbo c++
----------------------------------------------------------------------------------------------------
// program to reverse a string // title of program
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
#include<conio.h>
void string_reverse(); // function prototype
int main() // main function returning integer value
{
string_reverse(); // function calling
getch(); //holds the output
return 0; // returning value 0
}
void string_reverse() // function body
{
char string[100]; // string declaration
printf("enter string"); // message declaration
gets(string); // gets string from user
strrev(string); // reverses the string and stores in memory
puts(string); // displays that reversed string
}
#include<stdio.h> // header file to control input and output
#include<string.h> //header file to handle string function
#include<conio.h>
void string_reverse(); // function prototype
int main() // main function returning integer value
{
string_reverse(); // function calling
getch(); //holds the output
return 0; // returning value 0
}
void string_reverse() // function body
{
char string[100]; // string declaration
printf("enter string"); // message declaration
gets(string); // gets string from user
strrev(string); // reverses the string and stores in memory
puts(string); // displays that reversed string
}