Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

can you make functions on my code?: #include #include main(){ char s[20] [80]; int x, count =0; clrscr(); for(x=0;x<20;x++){ printf("Enter a string: "); gets(s[x]); if(s[x][0]=='z'){ count++; } } printf("\nNumber of strings that start with "z" : %d ", count); getch(); }

OpenStudy (anonymous):

just break your code into parts and take each part so that you can place it into a function, then.. Call all the functions

OpenStudy (anonymous):

simply start from below the main and put everything into a function called strcount(void) the return type is int.... also declare a variable a in main() and in printf call the function directly... and u've done function!!!!!!!! hope u understood

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!