Code:
#include <stdio.h>
#include <stdlib.h>
#define SIZE 2
main()
{
int i,j;
char aac[][SIZE] = {{'a','b'},{'c','d'}}, *as[] = {{"Hello"},{"World"}};
I want the output to be:
abcd
HelloWorld
So I wrote this:
Code:
puts("char aac[][2]\n");
for (i=0; i<SIZE ; i++)
for(j=0; j<SIZE ; j++)
printf("%c", aac[i][j]);
And so far so good, but as for the array of strings I don't know what condition to put on the loop. So it looks like this:
Code:
puts("\n\nchar *as[]\n");
for(i=0; ??? ; i++)
for(j=0; as[i][j]!='\0' ; j++)
printf("%c", as[i][j]);
What do I put in ???