天天看點

二級指針操作二維字元串數組

#include <stdio.h>
#include <stdlib.h>
int main(){
    char *a[]={"saa","sdadsa"};
    //or char a[20][10]={"saa","sdadsa"};
    char **p=NULL;
    p=(char **)malloc(sizeof(char *)*);
    p[]=a[];
    p[]=a[];
    printf("%s\n",p[] );
    printf("%s\n",p[] );
    printf("(%d)\n",sizeof(char *) );
    printf("(%d)\n",sizeof(double *) );
    printf("(%d)\n",sizeof(int  *) );
    return ;
}