This program uses the built-in function to reverse the given string. It is defined in the header file 'string.h' with the command 'strrev( )'
PROGRAM:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[80];
int l;
clrscr();
printf("\nEnter the String:");
gets(a);
l=strlen(a);
printf("\nThe Length of %s is %d",a,l);
getch();
}
PROGRAM:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[80];
int l;
clrscr();
printf("\nEnter the String:");
gets(a);
l=strlen(a);
printf("\nThe Length of %s is %d",a,l);
getch();
}
No comments:
Post a Comment