// reverse of string without using string function-- #include #include void main() { char str[10]; int i=0,j; printf("\t Enter any string--"); gets(str); while(str[i]!=NULL) { i++; } printf("\t String after reverse=="); for(j=i;j>=0;j--) { printf("%c",str[j]); } }
/* To display the Reverse of string*/ #include #include #include void main() { char str[10]; int i=0,j=0; printf("\n\t Enter a string"); gets(str); printf("\n\tReverseof a string",str); while(str[i]!=NULL) { i++; } for(j=i;j>=0;j--) { printf("%c",str[j]); }
//reverse the string without using string
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0,j=0;
printf("Enter a string=");
gets(str);
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
/*To display the Reverse of sring*/
ReplyDelete#include
#include
#include
void main()
{
char str[10];
int i=0,j;
printf("\n\t Enter the string");
gets(str);
printf("\n\t the reverse string:");
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("\n\t operated string is %c",str[j]);
}
}
/*reverse of string*/
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0,j;
printf("\n\t enter a string");
gets(str);
printf("\n\t enter reverse string");
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
// reverse of string without using string function--
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0,j;
printf("\t Enter any string--");
gets(str);
while(str[i]!=NULL)
{
i++;
}
printf("\t String after reverse==");
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
/* To display the Reverse of string*/
ReplyDelete#include
#include
#include
void main()
{
char str[10];
int i=0,j=0;
printf("\n\t Enter a string");
gets(str);
printf("\n\tReverseof a string",str);
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
This comment has been removed by the author.
ReplyDelete#include
ReplyDelete#include
void main()
{
char s[50],rev[50];
int i=0,j=0;
printf("enter string =");
scanf("%s",s);
while(s[i]!='\0')
{
i++;
}
i--;
while (i>=0)
{
rev[j] = str[i];
j++;
i--;
}
rev[j]='\0';
printf("Reverse of string is : %s\n",rev);
}
#include
ReplyDeletevoid main()
{
char str[10];
int i=0,j;
printf("\n\t enter a string");
scanf("%s",str);
printf("\n\t enter reverse string");
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
#include
ReplyDelete#include
void main()
{
char str[10];
int i=0,j;
printf("\n\t Enter the string");
gets(str);
printf("\n\t the reverse string:");
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("\n\t operated string is %c",str[j]);
}
}
//revers the given string
ReplyDelete#include
#include
void main()
{
char str[10];
int i=0,j;
printf("enter ur string");
gets(str);
printf("revers the string");
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
printf("\n");
}
#include
ReplyDelete#include
void main()
{
char str[10];
int i=0,j;
printf("\n Enter the string");
gets(str);
printf("\n the reverse string:");
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("\nstring is %c",str[j]);
}
}
/*count vowel & consonent*/
ReplyDelete#include
#include
#include
void main()
{
char str[8];
int cnt1=0,cnt2=0; int i;
printf("\n\t enter sting");
gets(str);
while(str[i]!=NULL)
{
if(i=='a'||i=='e'||i=='i'||i=='o'||i=='u')
{
cnt1++;
}
else
{
cnt2++;
}
i++;
}
printf("total vowel=%d,consonent=%d",cnt1,cnt2);
}
/*revers string*/
ReplyDelete#include
#include
void main()
{
char str[10]="sknscoe";
int i=0,j=0;
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
// reverse of the string
ReplyDelete#include
#include
void main()
{
char s[10];
int i=0;
int j;
printf("\n\t Enter the string");
gets(s);
for(j=i;j>=0;j--)
{
printf("\n\t string=%c",s[j]);
}
}
#include
ReplyDelete#include
void main()
{
char str[100];
int i=0,j=0;
printf("\n\tEnter a string=");
scanf("%s",str);
while(str[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("%c",str[j]);
}
}
/* reverse of string */
ReplyDelete#include
#include
#include
void main()
{
char str[10];
int i=0;j=0;
printf("enter string");
gets(str);
while(str[i]!=NULL)
{
i++;
for(j=i;j>=0;j--)
printf("%c",str[j]);
}
}
/*Revese a string*/
ReplyDelete#include
#include
void main()
{
char s[7];
int i=0,j=0;
printf("\n\t enter a string");
gets(s);
while(s[i]!=NULL)
{
i++;
}
for(j=i;j>=0;j--)
{
printf("\n\t reverce string=%c",s[j]);
}
}