自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 指针学习笔记4(函数指针相关)

1.函数指针数组指针:指向数组的指针函数指针:指向函数的指针

2021-08-12 21:29:51 98

原创 指针学习笔记3(数组与指针传参)

1.一维数组在传参的时候可以传数组和指针#include<stdio.h>void test(int arr[]){}void test(int arr[10]){}void test(int*arr){}void test2(int* arr[20]){}void test2(int** arr){}int main(){ int arr[10] = {0};//数组 int* arr2[20] = {0};//指针数组 test(arr); test2

2021-08-10 21:05:09 111

原创 指针学习笔记2(数组指针和指针数组)

目录1、指针数组2、数组指针1、指针数组指针数组是数组,用来存放指针int main(){ int* parr[4];//存放整型指针的数组——指针数组 char* pch[4];//存放字符指针的数组——指针数组 return 0;}一种简单的指针数组应用方法int main(){ int arr1[] = {1,2,3,4,5}; int arr2[] = { 2,3,4,5,6 }; int arr3[] = {3,4,5,6,7}; int.

2021-08-08 21:19:49 84

原创 指针学习笔记1

代码1#include<stdio.h>int main(){ char* p = "abcdefg";// "abcdefg"是一个常量字符串 printf("%c\n",*p); printf("%s\n",p); return 0;}“p”中存的是“a”的地址,所以*p=a.printf("%s\n",p);表示从p存的地址处开始打印代码2#include<stdio.h>int main(){ char arr1[] = ".

2021-08-08 17:10:39 55

原创 C语言程序设计练习——井字棋

主函数代码段#include<stdio.h>#include"game.h"#define _CRT_NONSTDC_NO_WARNINGS#define _CRT_SECURE_NO_WARNINGS_GLOBALSvoid menu()//菜单栏{ printf("********井字棋********\n"); printf("****1.play 0.exit****\n"); printf("**********************\n");}v

2021-07-12 21:45:34 342

原创 二分/折半查找算法实例

#include<stdio.h>int main(){ int i = 0; int arr[] = { 1,2,3,4,5,6,7,8,9,10 }; int sz = sizeof(arr) / sizeof(arr[0]); int left = 0; int right = sz - 1; int n = 0; scanf("%d",&i); while (left <= right) { n = (right+left) / 2; i.

2021-07-06 09:48:52 52

原创 C语言求阶乘与阶乘和

#include<stdio.h>int main(){ int a = 0;; int b = 0; int i = 0; int n = 0; scanf("%d",&n); for (i = 1,a=1; i<=n; i++) { a = i * a;//算阶乘 b = a + b;//求和 } printf("阶乘=%d\n",a );//阶乘 printf("阶乘和=%d\n",b);//阶乘和 return 0;}...

2021-07-05 22:27:32 542

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除