房天下 > 房天下问答 > 业主生活 > 其他
  • 有关于计算机C语言的Pointer问题

    Pointer types: give the correct declaration of t (that is, what is the type of t?). Eg: int k; t = &k;1. int *arr[5]; t = arr[1];2. struct vnode *v; t = &v;3. vaddr_t entrypoint; t = &entrypoint;4. int main(int argc, char **argv) { t = main;5. struct thread ** thr; t = *thr;6. struct thread { ... char *t_name; const void *t_sleepaddr; char *t_stack; ... } struct thread *thr = ... ; t = thr->t_name;希望能给点解释。谢谢

    提问者:rewvan

    发布于2010-12-06

共1个回答
  • 希望足球吧 丨Lv 3
    EG:定义一个整型k,将k的地址赋给t1 定义一个指针数组,将arr[1]中的指针赋给t2 定义一个结构指针 并对其取地址赋给t3 定义一个vaddr_t 并对其取地址4不明白5 定义一个指针的指针 将指针赋给t6 定义一个结构指针 并将其t_name所指向的字节赋给t
    +1 2010-12-07 举报
热门人气推荐
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。