题解 | #嵌入式宏空间坐标数量#

嵌入式宏空间坐标数量

https://www.nowcoder.com/practice/d39d14aa884f490a987854fbc5248b7e

/**
 * struct Point {
 *	int x;
 *	int y;
 * };
 */
/**
 * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
 *
 * 
 * @param point Point类 上方struct仅为二维空间点类示例,题中为多维空间的点类
 * @return int整型
 */
#define num(p) sizeof(p)/sizeof(p.x)

int define_count(struct Point point ) {
    // write code here
    return num(point);
}

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务