硬汉嵌入式论坛

 找回密码
 立即注册
查看: 738|回复: 8
收起左侧

求教。。哪位大神有支持C11的C编辑编译软件

[复制链接]

5

主题

28

回帖

43

积分

新手上路

积分
43
发表于 2022-4-26 16:03:14 | 显示全部楼层 |阅读模式
如题。。正在学C语言,用的C Primer Plus( 第6版) 中文版 。。里面有一些例程是C11的。。

回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106638
QQ
发表于 2022-4-26 16:47:38 | 显示全部楼层
MDK,IAR,GCC等都支持。
回复

使用道具 举报

5

主题

28

回帖

43

积分

新手上路

积分
43
 楼主| 发表于 2022-4-26 21:59:18 | 显示全部楼层
我装的是MDK5..36,可以直接编译C程序??
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106638
QQ
发表于 2022-4-27 09:08:16 | 显示全部楼层
没问题,支持C11
回复

使用道具 举报

1

主题

35

回帖

38

积分

新手上路

积分
38
发表于 2022-4-27 13:44:50 | 显示全部楼层
学C语言那直接VS啊
回复

使用道具 举报

5

主题

28

回帖

43

积分

新手上路

积分
43
 楼主| 发表于 2022-4-27 20:44:23 | 显示全部楼层
太大了
回复

使用道具 举报

5

主题

28

回帖

43

积分

新手上路

积分
43
 楼主| 发表于 2022-4-27 20:50:37 | 显示全部楼层
用MDK建立C ,要怎么用不会用
回复

使用道具 举报

5

主题

28

回帖

43

积分

新手上路

积分
43
 楼主| 发表于 2022-4-27 20:55:30 | 显示全部楼层
/* showf_pt.c -- 以两种方式显示float类型的值 */
#include <stdio.h>
int main(void)
{
    float aboat = 32000.0;
    double abet = 2.14e9;
    long double dip = 5.32e-5;
    printf("%f can be written %e\n", aboat, aboat);
// 下一行要求编译器支持C99或其中的相关特性
    printf("And it's %a in hexadecimal, powers of 2 notation\n",
                   aboat);
    printf("%f can be written %e\n",
             abet,                   abet);
    printf("%Lf can be written %Le\n",
                 dip,                      dip);
   
return 0;
}

这段程序有些编译后输出不对
回复

使用道具 举报

5

主题

28

回帖

43

积分

新手上路

积分
43
 楼主| 发表于 2022-4-27 22:08:11 | 显示全部楼层
/* showf_pt.c -- 以两种方式显示float类型的值 */
#include <stdio.h>
int main(void)
{
    float aboat = 32000.0;
    double abet = 2.14e9;
    long double dip = 5.32e-5;
    printf("%f can be written %e\n", aboat, aboat);
// 下一行要求编译器支持C99或其中的相关特性
    printf("\n  以下三行编译器不同,输出也将不同!!!\n");
    printf("And it's %a in hexadecimal, powers of 2 notation\n",
                   aboat);
    printf("%f can be written %e\n",
           abet,             abet);
    printf("%Lf can be written %Le\n",
             dip,              dip);

    return 0;
   
}

/*
code blocks 20.03输出 :

    32000.000000 can be written 3.200000e+004

  以下三行编译器不同,输出也将不同!!!
And it's 0x1.f40000p+14 in hexadecimal, powers of 2 notation
2140000000.000000 can be written 2.140000e+009
0.000000 can be written 1.133023e-317

Process returned 0 (0x0)   execution time : 0.462 s
Press any key to continue.

----------------------------------------------------

  dev-cpp-6.7.5 输出 :

32000.000000 can be written 3.200000e+04

  以下三行编译器不同,输出也将不同!!!
And it's 0xf.ap+11 in hexadecimal, powers of 2 notation
2140000000.000000 can be written 2.140000e+09
0.000053 can be written 5.320000e-05

--------------------------------
Process exited after 0.955 seconds with return value 0
请按任意键继续. . .

正确输出 :(这是我在一个C语言网站上用在线编译输出的)

32000.000000 can be written 3.200000e+04

  以下三行编译器不同,输出也将不同!!!
And it's 0x1.f4p+14 in hexadecimal, powers of 2 notation
2140000000.000000 can be written 2.140000e+09
0.000053 can be written 5.320000e-05


*/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-4-27 09:31 , Processed in 0.237092 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表