zoukankan      html  css  js  c++  java
  • 指针啊指针

    用变量a给出下面的定义
    a) 一个整型数
    b)一个指向整型数的指针( A pointer to an integer) 
    c)一个指向指针的的指针,它指向的指针是指向一个整型数( A pointer to a pointer to an intege)
    d)一个有10个整型数的数组( An array of 10 integers) 
    e) 一个有10个指针的数组,该指针是指向一个整型数的。(An array of 10 pointers to integers) 
    f) 一个指向有10个整型数数组的指针( A pointer to an array of 10 integers)
    g) 一个指向函数的指针,该函数有一个整型参数并返回一个整型数(A pointer to a function that takes an integer as an argument and returns an integer) 
    h) 一个有10个指针的数组,该指针指向一个函数,该函数有一个整型参数并返回一个整型数( An array of ten pointers to functions that take an integer argument and return an integer )

    答案是
    a) int a; // 一个整型数 An integer 
    b) int *a; // 一个指向整型数的指针 A pointer to an integer 
    c) int **a; // 一个指向指针的的指针 A pointer to a pointer to an integer 
    d) int a[10]; // 一个有10个整型数的数组 An array of 10 integers 
    e) int *a[10]; // 一个有10个指针的数组 An array of 10 pointers to integers 
    f) int (*a)[10]; // 一个指向有10个整型数数组的指针 A pointer to an array of 10 integers 
    g) int (*a)(int); // 一个指向函数的指针 A pointer to a function a that takes an integer argument and returns an integer 
    h) int (*a[10])(int); // 一个有10个指针的数组,指向一个整形函数并有一个整形参数 An array of 10 pointers to functions that take an integer argument and return an integer

  • 相关阅读:
    js调试工具Console命令详解
    tomcat如何正确的开启远程调试功能
    Cleanup failed to process the following paths错误的解决
    MySQL查看SQL语句执行效率
    MYSQL 的静态表和动态表的区别, MYISAM 和 INNODB 的区别
    JAX-RS之queryparam、PathParam、DefaultValue、FormParam、Context、RestController等
    C语言中的printf函数的输入输出问题
    leetcode 21.Merge Two Sorted Lists ,java
    初识C++ 中的STL
    leetcode 58.Length of Last Word
  • 原文地址:https://www.cnblogs.com/pang123hui/p/2309896.html
Copyright © 2011-2022 走看看