zoukankan      html  css  js  c++  java
  • [iOS经典面试题]用变量a给出下面的定义

    用变量a给出下面的定义

     
     
     
    a)一个整型数(An integer)

     

    b) 一个指向整型数的指针(A pointer to an integer)  
    c) 一个指向指针的的指针,它指向的指针是指向一个整型数(A pointer to a pointer to an integer) 
    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]; // An array of 10 integers 
    e) int *a[10]; // An array of 10 pointers to integers  (int * 修饰后面对数组)
    f) int (*a)[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); // An array of 10 pointers to functions that take an integer argument and return an integer

  • 相关阅读:
    WSL2
    坐标系变换
    Python websocket
    PAJ7620 IIC 通信
    Python中assert的使用
    Python中循环的使用
    Linux 生成指定大小文件
    SVN不显示log 显示1970年问题
    阿里云 CS实例 开机自运行脚本文件
    生成UDS安全算法DLL文件
  • 原文地址:https://www.cnblogs.com/LiLihongqiang/p/5555763.html
Copyright © 2011-2022 走看看