Skip to content

Instantly share code, notes, and snippets.

Created January 23, 2015 17:55
Show Gist options
  • Select an option

  • Save anonymous/4102e1141db035456789 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/4102e1141db035456789 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
int i = 0;
int intarray[10] = { 1, 2, 7, 4, 3, 7, 3, 9, 5, 0 };
char chararray[10] = { 'h', 'e', 'l', 'l', 'o', ' ', 'y', 'o', 'u', '\0' };
while ( i < 10 )
{
printf("%d\n", intarray[i]);
++i;
}
i = 0;
while ( i < 10 - 1 )
{
printf("%c\n", chararray[i]);
++i;
}
printf("%s\n", chararray);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment