Question: C program Use the program in cplusplus.com under malloc. A copy is provided here for you. /* malloc example: random string generator*/ #include /* printf,

C program

Use the program in cplusplus.com under malloc. A copy is provided here for you.

/* malloc example: random string generator*/ #include /* printf, scanf, NULL */ #include /* malloc, free, rand */ int main (){ int i,n; char * buffer; printf ("How long do you want the string? "); scanf ("%d", &i); buffer = (char*) malloc (i+1); if (buffer==NULL) exit (1); for (n=0; n

/* YOUR CODE GOES HERE */

free (buffer); return 0; }

Modify the above program to find out how many vowels are generated in the c-string.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!