- 博客(37)
- 收藏
- 关注
原创 开发工具:vscode 自动编译typescript、无法加载文件 D:\nodejs\node_global\webpack.ps1
参考https://blog.csdn.net/yun_hou/article/details/93622575https://www.cnblogs.com/yanliangnh/p/8366655.htmlhttps://www.jianshu.com/p/aa4145604ca9https://www.jianshu.com/p/3bdc4461d8d0https://zho...
2019-12-30 20:42:42 264
原创 网址运维:Composer安装、安装TP6
Windows安装 - Composerhttps://www.kancloud.cn/thinkphp/composer/35668Packagist 镜像使用方法https://pkg.phpcomposer.com/#how-to-install-composer阿里云 Composer 全量镜像https://developer.aliyun.com/composer系统...
2019-12-27 20:28:43 746
原创 C :文件读写
https://www.runoob.com/cprogramming/c-file-io.html#include <stdio.h>int main(){ FILE *fp = NULL; fp = fopen("G:\\Temp\\test.txt", "w+"); fprintf(fp, "This is testing for fprintf.....
2019-12-24 22:28:46 98
原创 C:位运算
https://www.runoob.com/cprogramming/c-bit-fields.html#include <stdio.h>#include <string.h>struct{ unsigned int age : 3;} Age;int main( ){ Age.age = 4; printf( "Sizeof( A...
2019-12-23 22:07:34 82
原创 C:typedef
typedefhttps://www.runoob.com/cprogramming/c-typedef.html#include <stdio.h>#include <string.h>typedef struct Books{ char title[50]; char author[50]; char subject[100]; ...
2019-12-23 21:57:55 87
原创 C:enum(枚举)
enum(枚举)https://www.runoob.com/cprogramming/c-enum.html#include <stdio.h>#include <stdlib.h>int main(){ enum color { red=1, green, blue }; enum color favorite_color; ...
2019-12-23 21:54:50 294
原创 C: 共用体
共用体https://www.runoob.com/cprogramming/c-unions.html#include <stdio.h>#include <string.h>union Data{ int i; float f; char str[20];};int main( ){ union Data data; ...
2019-12-23 21:51:53 124
原创 C:结构体
#include <stdio.h>struct Books{ char title[50]; char author[50]; char subject[100]; int book_id;} book = {"C 语言", "RUNOOB", "编程语言", 123456};int main(){ printf("title ...
2019-12-22 18:22:00 119
原创 C:动态申请内存
在这里插入代码片#include <stdio.h>#include <stdlib.h>int main(){ char *pstr=NULL; pstr=(char*)malloc(sizeof(char)*10); if(NULL==pstr) { return -1; } printf(...
2019-12-22 12:10:21 79
原创 C:指针数组
在这里插入代码片#include <stdio.h>void help(){ printf("\t-t Ping 指定的主机,直到停止。\r\n"); printf("\t-a 将地址解析为主机名。\r\n");}int main(int argc, char *args[]){ char *str[] = { "...
2019-12-21 12:00:09 100
原创 C:数组指针
在这里插入代码片#include <stdio.h>int main(){ int n = 10; int *p = &n; int **pp = &p; printf("%p %p\r\n", pp, &p); printf("%p %p\r\n", *pp, &n); printf("...
2019-12-21 11:24:44 66
原创 C:函数指针
#include <stdio.h>int max(int a, int b){ return a > b ? a : b;}int min(int a, int b){ return a < b ? a : b;}int compare(int a, int b, int (*pf)(int, int)){ retur...
2019-12-20 22:07:09 63
原创 C:返回指针的函数
#include <stdio.h>#include <string.h>int * max(int *x,int *y){ printf("x addr = %p, y addr = %p \r\n",x,y); printf("x addr = %d, y addr = %d \r\n",*x,*y); return *x >*...
2019-12-20 21:43:11 76
原创 C:指针和数组元素
#include <stdio.h>int main(){ int arr[10]={1,2,3,4,5,6,7,8,9,10}; int *p=&arr[9]; int i=0; for (;i<=9;i++,p--) { *p=i; } for (i=0;i<=9;i++,p--...
2019-12-19 22:20:59 104
原创 C:指针在函数间传参
#include <stdio.h>void swap(int *x,int *y){int tmp ;tmp=*x;*x=*y;*y=tmp;}int main(){ int a=10,b=20; printf("a=%d,b=%d\r\n",a,b); printf("&a=%p,&b=%p\r\n",&a...
2019-12-19 20:40:01 146
原创 C:指针
C 指针https://www.runoob.com/cprogramming/c-pointers.html#include <stdio.h>int main(){ int i=10,j=20; int *p=NULL; int *q=&j; p=&i; printf("%p=>%d %p=>%d \r\n",&a...
2019-12-18 21:00:59 84
原创 C:变量
#include <stdio.h>int main(){ int a=3,b=4,c=5,d=6; printf("%d %d %d %d \r\n",a,b,c,d); { int a=31,b=42,c=53; d=64; printf("%d %d %d %d \r\n",a,b,c,d); ...
2019-12-16 22:27:08 58
原创 C:字符串数组作为函数参数
#include <stdio.h>/*void PrintStr(char s[][50], int n){ int i = 0; for ( i = 0; i < n; i ++ ) { puts(s[i]); }}*/int main(){ /* char arr[][50] = { ...
2019-12-16 21:52:11 8477
原创 C:字符串(1)
#include <stdio.h>int main(){ char arr[50]={0}; puts("please input a str"); gets(arr); puts(arr);}#include <stdio.h>int main(){ /* char arr[50]={...
2019-12-16 20:35:21 75
原创 C语言:数组(3):数组作为函数的形参
在这里插入代码片#include <stdio.h>#define SIZE 11int max(int [], int);void change(int []);void tmp(int []);int main(){ int arr[SIZE] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; int x[] =...
2019-12-15 17:54:50 1703
原创 C语言:数组(2):二维数组
在这里插入代码片#include <stdio.h>int main(){ int arr[4][5]= { {1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5}, {1,2,3,4,5} }; int i ,j; for (i=0;i<4;i++) { for (j=0;j<5;j++) {...
2019-12-15 17:19:51 302
原创 C语言:数组(1):一维数组
#include <stdio.h>int main(){ /* int arr[5]={1,2,3}; int b[10]={0}; int i; for (i=0;i<5;i++) { printf("%d",arr[i]); } printf("\r\n"); scanf("%d",(int *)0x0115fc79); pr...
2019-12-15 16:30:24 178
原创 C语言:多文件编译-头文件.h+源文件.c
cs.h#pragma once#include "std.h"void PrintMenu();std.h#pragma once#include <stdio.h>#include <math.h>//公共库stu.h#pragma once#include "std.h"//引入公共库void PrintStuMenu();/...
2019-12-15 12:14:23 674
原创 C语言:函数-递归
#include <stdio.h>int fn(int num);int main(){ int i, sum; for(i=1,sum=0;i<=100;i++) { sum+=i; } printf("sum=%d\r\n",sum); sum=fn(5); printf("sum=%d...
2019-12-15 11:43:42 114
原创 C语言:函数(2)参数
#include <stdio.h>void swap(int x, int y);int main(){ int x,y; x=10; y=20; printf("main=>x=%d,y=%d\r\n",x,y); swap(x,y); printf("main=>x=%d,y=%d\r\n",x,y); ...
2019-12-15 11:04:42 97
原创 C语言:函数(1)
#include <stdio.h>void PrintMenu();//函数的原型或声明int main(){ PrintMenu();//函数的调用}//函数的定义void PrintMenu(){ printf("*****************\r\n"); printf("1、学生管理\r\n"); print...
2019-12-15 10:37:11 225
原创 C语言:循环结构break\continue\goto
在这里插入代码片#include <stdio.h>int main(){ int i,j; for (i=1;i<=9;i++) { for(j=1;j<=9;j++) { printf("%2d*%2d=%2d",i,j,i*j); } pr...
2019-12-14 22:23:26 117
原创 C语言:循环结构for
#include <stdio.h>int main(){ int n,sum; for (n=1,sum=0;n<=100;sum+=n,n++); printf("sum=%d\r\n",sum);}
2019-12-14 21:51:19 121
原创 C语言:循环结构一while、do............while
在这里插入代码片#include <stdio.h>void main(){ int num ,sum; /* while (scanf("%d",&num)) { sum+=num;//sum=sum+num; } printf("%d\r\n",sum); */ do ...
2019-12-14 17:41:12 73
原创 C语言:switch case break、条件运算符:三目运算
三目运算#include <stdio.h>void main(){ int n; printf("菜单项:\r\n"); printf("(1)学生管理:\r\n"); printf("(2)课程管理:\r\n"); printf("(3)班级管理:\r\n"); printf("请选择要进入到的管理模块,输入1~3:...
2019-12-14 17:14:58 515
原创 C语言:控制结构之分支(一)if.....else
#include <stdio.h>void main(){ char c; scanf("%c",&c); if((c>='a')&&(c<='z')) { printf("%c\r\n",c); }/* int n=0; printf("请输入你的幸...
2019-12-14 16:37:23 149
原创 C语言:运算符
#include <stdio.h>/* 这里是多行注释*/void main(){ int i=5/2; float f=5/2; float f1=5.0/2; //测试除法符号的输出 printf("%d %f %f \r\n",i,f,f1);}...
2019-12-14 15:44:56 337
原创 C语言:浮点数IEEE编码
浮点数分为单精度和双精度,即 float 和 double#include <stdio.h>void main(){ float f = 125.625f; // 42 fb 40 00 // 125.625 // 0111 1101 0.5 + 0.125 0.101 // 1111101.101 // 1.11...
2019-12-14 15:30:43 1233
原创 C语言:变量
#include <stdio.h>#include <limits.h>#include <stdint.h>#include <float.h>void main(){ char c1,c2; int i; float f; int16_t i16t; i=(int)2.5; ...
2019-12-14 11:30:36 77
原创 C语言:格式化标准输入输出函数-printf()和scanf()函数-转换类型
#include <stdio.h>void main(){ int a,b; float c; char s[10]; printf("abcdefg\n"); printf("123\t456\b789\r0"); printf("\n"); printf("a=%d,b=%f,c=%c, d=%s \r...
2019-12-14 10:13:45 870
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人