原创 (c語言)選擇排序與冒泡排序

#include <stdio.h> #include <string.h> void select( int *a, int b )                               //選擇排序 {     int j;  

原创 0513學習總結(數據結構,鏈表)

一、數據結構: 1、什麼是數據結構;數據結構是把數據按照一定的組織方式組織起來,便於操作(增刪查改)! 2、數據結構有哪些;1、單個變量;int num;2、數組:數組是用來存儲比較多的數據;“戶”!3、結構體:4、鏈表(單鏈表、雙鏈表)

原创 (c語言)不使用鏈表:13個人一次報號,報道3的人退出,輸出最後一個人

#include <stdio.h>   int main() {     int n = 0;     int i = 0;     int k = 0;     int count = 0;                      

原创 0408學習總結(linux基礎命令,vim基礎的使用)

1.什麼是嵌入式? 嵌入式:已應用爲中心,已計算機技術爲基礎,軟硬件可裁剪。 2.嵌入式的可靠性要求更高,功耗要求也很高。 3.嵌入式的特點: (1)低功耗 (2)聯網化 (3)操作系統化 (4)分層(底層、os層、應用層) (5)跨

原创 0415學習總結(c語言循環,字符串)

1.c語言中,return代表函數結束,exit代表程序結束 2.程序註釋時要注意長度最長的程序並且,註釋時要注意對齊 3.局部變量的作用域:(1)局部變量的作用域在於定義的代碼塊裏,也就是{}包含的部分,全局變量的作用域是整個文件

原创 0707學習總結(類,namespace,函數重載,帶默認值得函數)

一.c++例子#include <iostream>using namespace std;int main(){cout<<"hello word"<<endl;//cout-->printf  endl-->\nreturn 0;}編

原创 (c語言)在一個有數字的字符串中輸出最長的數字

#include <stdio.h> #include <string.h>   /*void my_strcpy(char *b,char *a,int c) {     while(c)     {         *b = *a;

原创 0423學習總結(各種指針)

1.數組名作爲函數退化的指針void fun(int *a)/void fun(int a[]) 2.指針數組:是一個數組,數組裏面保存的是指針char *str[]; 3.const關鍵字:const:constant(不變)修飾變量的

原创 (c語言)將一個二維數組的行列互換

#include <stdio.h>   #define N 3   void fun1( int a[][N] ) {     int temp = 0;     int i = 0;     int j = 0;       for(

原创 (c語言)鏈表方法:13個人一次報號,報道3的人退出,輸出最後一個人

#include <stdio.h>   struct person {     int number;     int nextp; };   int main() {     struct person link[14];     i

原创 (c語言)比較兩個字符串的大小

#include <stdio.h>   #define N 100   int input( char *a, char *b )                   //輸入兩個字符串 {     printf("Input the

原创 0422學習總結(內存、指針、關鍵字)

1.內存管理c語言中的程序和函數都是加載到內存中運行,加載到物理內存,應用程序顯示虛擬內存,OS管理內存。 2.內存分爲哪些東西:(1)棧空間:局部變量(a,b),函數的形參(fun(int a,int b)),自動變量(auto修飾的變

原创 0419學習總結(數組,函數,預處理)

1.函數: 爲什麼需要使用函數?--類比於生活中的寫文章 2.有哪些函數? main函數:從main開始執行,在main中結束 3.函數的知識點:(1)定義:函數的關鍵,函數的實現部分(2)聲明:函數原型聲明,函數的返回值,函數的列表

原创 (c語言)輸入一串數字,輸出字符串

#include <stdio.h>   #define N 100   int main() {     long num = 0;     long j = 0;     int count = 0;     char b;     

原创 (c語言)在字符串中刪除子串

#include <stdio.h> #include <string.h> void input(char *a,char *b)                                          //輸入函數 {