随笔分类 - C
摘要:#include <stdio.h> int *p = (int[]){8, 7}; // creates an unnamed static array of type int[2] // initializes the array to the values {2, 4} // creates
阅读全文
摘要:1 #include <stdio.h> 2 3 struct Payload { 4 char* title; 5 char* data; 6 }; 7 8 char* extractData(struct Payload *payload); 9 10 int main(int argc, ch
阅读全文
摘要:1 struct Inner; 2 3 struct Outer 4 { 5 long id; 6 7 struct Inner *inner; 8 9 }; 10 11 struct Inner 12 { 13 long seq; 14 }; 15 16 int main(int argc, ch
阅读全文
摘要:microsoft 出品的 cl编译器运行/调试c配置,cl.exe 通过visual studio c ++ build tools 安装: 安装或者安装失败可以看教程:https://blog.csdn.net/HaoZiHuang/article/details/125795675 launc
阅读全文
摘要:1 #include <stdio.h> 2 3 void bubble_sort(int arr[], int len); 4 5 void main() { 6 int arr[] = {5, 5, 6, 9, 10, 1, 0, 3, 2}; 7 8 int total_size = size
阅读全文
摘要:#include <stdio.h> void main() { int year; int month; int day; printf("calculate Weekday of input date!\n"); printf("year:"); scanf("%d", &year); prin
阅读全文
摘要:C语言编程要求: 要求编写一个简单的成绩评价系统1要求循环对若干(未知数)学生的百分制成绩进行评价;2 90分以上(包括100分),等级为A;80分以上(包括80分,但不包括90分),等级为B; 70分以上(包括70分,但不包括80分),等级为C; 60分以上(包括60分,但不包括70分),等级为D;60分以下(不包括60分,包括0分),等级为E; 3 健壮性判断:超过100分或低于0分,程序报错。程序代码:#include "stdio.h"void main(){ int n; /*定义整数n*/ float score; /*把...
阅读全文
摘要:#include "stdio.h"void max(int *p,int N) /*求最大数的函数(void--无返回值),定义指针*/{ int i,max=*p; /*定义整型i;设指针指向的第一个值是最大值*/ for(i=0;i<N;i++,p++) /*for循环,逐个指针向下*/ { if(max<*p) /*假如后面出现一个比前一个数值大的数*/ max=*p; ...
阅读全文

浙公网安备 33010602011771号