Asutorufaのブログ

こんにちは


  • Home

  • Tags

  • Categories

  • Archives

  • About

  • Friends

  • Search

c语言数组输出的另一种方法

Posted on 2017-12-10 | Post modified: 2017-12-10 | In Program

今天看到这样一种写法,原文链接:一个有趣的C语言程序

#include <stdio.h>
 
int main()
{
    int a = 1;
    int x[5]={1,2,3,4,5};
    printf("%d",a[x]);
    return 0;
}
output: 2
Read more »

利用结构体让函数返回多个值

Posted on 2017-11-29 | Post modified: 2017-11-29 | In Program

c语言

#include "stdio.h"
typedef struct test //建立结构体
{
 int a;
 int b;
 int c;
}T;

T testt(int aa,int bb,int cc) //建立函数
{
 T aaa;
 aaa.a=aa*bb;
 aaa.b=aa*cc;
 aaa.c=bb*cc;
 return aaa; //返回结构
}

int main()
{
 T b=testt(4,5,6);
 printf("%d %d %d \n",b.a,b.b,b.c);
 T *f=&b;
 printf("%d %d %d",f->a,f->b,f->c);
}

C++

Read more »

c语言基本类型在内存中的存储方式

Posted on 2017-10-30 | Post modified: 2017-10-30 | In Program

浮点数

float

符号位+指数位+尾数位
↑↑↑
第一位8位23位
Read more »

c语言利用char指针变量将int按字节打印地址

Posted on 2017-10-24 | Post modified: 2017-10-24 | In Program

因为int变量的大小为四个字节,所以如果利用int指针变量+1输出地址的话,实际上是加了四个字节后的地址.
而char的大小刚好为一个字节,是我们想要的东西.
这样我们可以强制转换为char指针变量输出每个字节的地址然后+1,+2,+3来分别输出int的四个字节的地址,得到我们想要的内容.
代码如下

int a=-65;
char *b=(char *)&a;
printf("%p\n%p\n%p\n%p\n",a,a+1,a+2,a+3);
Read more »

c语言中格式化字符的应用

Posted on 2017-10-10 | Post modified: 2017-10-10 | In Program

格式化规定符

符号 作用
%d 十进制有符号整数
%u 十进制无符号整数
%f 浮点数
%s 字符串
%c 单个字符
%p 指针的值
%e 指数形式的浮点数
%x, %X 无符号以十六进制表示的整数

Read more »

常用等价无穷小的一般形式

Posted on 2017-10-09 | Post modified: 2017-10-09 | In Math

当lim⁡φ(x)→0\lim_{φ(x)\to0}limφ(x)→0​时,
sin⁡φ(x)\sin φ(x)sinφ(x)~φ(x)φ(x)φ(x)
arcsin⁡φ(x)arc\sin φ(x)arcsinφ(x)~φ(x)φ(x)φ(x)
tan⁡φ(x)\tanφ(x)tanφ(x)~φ(x)φ(x)φ(x)
arctan⁡φ(x)arc\tanφ(x)arctanφ(x)~φ(x)φ(x)φ(x)
ln⁡(1+φ(x))\ln(1+φ(x))ln(1+φ(x))~φ(x)φ(x)φ(x)
eφ(x)−1e^{φ(x)}-1eφ(x)−1~φ(x)φ(x)φ(x)
aφ(x)−1a^{φ(x)}-1aφ(x)−1~φ(x)ln⁡aφ(x)\ln aφ(x)lna
1+φ(x)n−1\sqrt[n]{1+φ(x)}-1n1+φ(x)​−1~1nφ(x)\frac{1}{n}φ(x)n1​φ(x)
(1+φ(x))μ−1(1+φ(x))^{\mu-1}(1+φ(x))μ−1~μφ(x)\muφ(x)μφ(x)
1−cos⁡φ(x)1-\cosφ(x)1−cosφ(x)~(φ(x))22\frac{(φ(x))^2}{2}2(φ(x))2​

三蛋空间自建贴吧云签到

Posted on 2017-10-08 | Post modified: 2017-10-08 | In 建站

–

这是我自建的贴吧云签到:~~http://dmly.tk~~(已失效)
之后为教程

注册免费空间

首先你得注册一个三蛋空间的账号,三蛋空间注册网址:三蛋空间

Read more »

更改绑定手机号

Posted on 2017-10-08 | Post modified: 2017-10-08 | In Personally

绑定手机号:微信,网易云,淘宝原手机号及证件,支付宝,google
银行卡,贴吧,酷安,微博需要原手机号,bilibili(需要原手机号)

Read more »
1…67

68 posts
23 categories
84 tags
RSS
GitHub E-Mail
0%
© 2025 Asutorufa