小编An *_*eur的帖子

在输出printf语句时遇到麻烦

我在理解以下代码片段的输出时遇到了一些麻烦。

#include<stdio.h>
int main()
{
    char *str;
    str = "%d\n";
    str++;
    str++;
    printf(str-2, 300);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

代码的输出为300。

我知道直到printf语句前的行str指向字符- %。我需要帮助的是理解为什么printf打印300功能。

c printf pointer-arithmetic post-increment

1
推荐指数
1
解决办法
50
查看次数

使用没有RadioGroup的RadioButton?

我可以在没有RadioGroup的情况下使用RadioButton吗?如果没有,请解释原因?我正在为xml中的android应用程序编程布局。

xml android

-2
推荐指数
1
解决办法
4521
查看次数

标签 统计

android ×1

c ×1

pointer-arithmetic ×1

post-increment ×1

printf ×1

xml ×1