Mega Code Archive
Vowels counting using vfork
#include
#include
int main()
{
int j,n,a,i,e,o,u;
char str[50];
a=e=i=o=u=0;
pid_t pid;
if((pid=vfork())<0)
{
perror("FORK ERROR");
exit(1);
}
if(pid==0)
{
printf("
Counting Number of Vowels using VFORK");
printf("
-------- ------ -- ------ ----- -----");
printf("
Enter the String:");
gets(str);
_exit(1);
}
else
{
n=strlen(str);
for(j=0;j