code

code


#include <stdio.h>

char pass(char str1[0][10], int size){

   for(int i=0;i<size;i++)

   printf("%s ", str1[i]);

   printf("\n");

}


char passptr(char *list, int max1, int max2){

   for (int i=0; i<max1; i++)

   for (int j=0; j<max2; j++)

   printf("%с ", *(list+i*max2+j));

}


int main(void) {

   char str[4][10]={"one","two", "three", "four five"};

   pass(str,4);

   char *ptr_int;

   ptr_int=&str[0][0];

   passptr(ptr_int, 4, 10);

 return 0;

}

Report Page