V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hardman
V2EX  ›  算法

codewase 注册题目如何解答 c 语言版本

  •  1
     
  •   hardman · 2017-11-16 18:51:30 +08:00 · 3850 次点击
    这是一个创建于 2345 天前的主题,其中的信息可能已经有所发展或是发生改变。

    int multiply(int a, char *b) { return a b; }

    是题目太难还是太简单了

    1 条回复    2017-11-17 11:43:58 +08:00
    hardman
        1
    hardman  
    OP
       2017-11-17 11:43:58 +08:00
    答案
    return a * (int)b;
    两个数相乘,因为 b 是指针类型之前强制转地址
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4118 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:13 · PVG 18:13 · LAX 03:13 · JFK 06:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.