C Program on String with Pointers
Get Certified in C Programming and Take Your Skills to the Next Level
Program 1
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s[100],*p;
int count=0,i;
printf("Enter a String: ");
gets(s);
i=strlen(s);
i--;
p=&s[i];
while(i>=0)
{
printf("%c",*p);
i--;
p--;
}
// while(*p!='\0')
// {
// printf("%c",*p);
// if(*p=='a'||*p=='e'||*p=='i' ||*p=='o'||*p=='u')
// count++;
// if(*p=='A'||*p=='E'||*p=='I' ||*p=='O'||*p=='U')
// count++;
// ++p;
// }
// printf("\n\nTotal Vowel %d ",count);
}
Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

