I am just starting out in C and am trying to create a function to receive an array, and then print it to the screen, 1 element at a time. I am having no joy at all. I can do it with an int array but not a char array.<br> <br>
How about:<br><br><FONT FACE=monospace>char my_array[10];<br><br>...<br><br>for (lc=0; lc<10; lc++)<br>{<br> printf("%c\n",my_array[lc]);<br>}</font><br><br>Hope that helps (and that I didn't make a silly mistake..)<br>Loon<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.