program to interchange names

#include
#include
#include
#include

//program to interchange names

void main()
{
char *names[]={"Pankaj",
"Paplu",
"POP",
"RAJESH",
"QWEST"
};
int i,c=0;
char *s;
clrscr();
for(i=0;i<=4;i++)
{
s=names[i];
while(*s)
{
if((*s=='a')||(*s=='A'))
{
c++;
// s++;
}
s++;
}
}
cout<<"no. of a strings "< getch();

}



No comments:

Post a Comment