Category:C

  • Modbus timeout calculation

    Time:2019-11-22

    Two timeouts in MODBUS: 1. The timeout between two frames is 3.5 characters. 2. The timeout of each character in a frame of data is 1.5 characters Processing a character in MODBUS is equivalent to processing a frame through serial port. The timeout is calculated according to the baud rate of communication: BPS = bit […]

  • C language to realize data structure maze experiment

    Time:2019-11-22

    In this paper, we share a simple data structure maze experiment implemented by C language for your reference. The details are as follows Analysis:There are two parts in maze experiment, one is the generation of maze, the other is the operation of using stack to find the way. Steps: I. h document 1. The first […]

  • Learning route of zero basic C / C + + language system

    Time:2019-11-21

    At present, the basic learning language of university is C language Don’t think that C language is simple. Actually, C language has a lot to learn For example: function pointer, pointer function, array pointer, pointer array, function pointer array, array function pointer For example: preprocessing, compiling, assembling and linking of programs are all gods and […]

  • Labyrinth problem of data structure in C language

    Time:2019-11-21

    In this paper, we share the specific code of maze problem stack in C language for your reference. The specific content is as follows The program mainly refers to the data structure c language version of teacher Yan Weimin, and is improved under the general framework of the program in the book. You can refer […]

  • The issue of C + + relief

    Time:2019-11-20

    N (n < 20) people stand in a circle, and the number is 1 ~ n anticlockwise. There are two officials. A counts counter clockwise from 1, and B counts clockwise from n. In each round, the number of officials a is k, and the number of officials B is m. The next person (1 […]

  • The maze problem of C language data structure

    Time:2019-11-20

    Now there are many versions of maze solution on the Internet. I am a little white, paste my own solution to the maze of this small project, I wrote it. I hope I can help some people who are also in difficulty. After all, I had a long time to understand. First of all, to […]

  • C language package, unpack and browse package file information based on form command line

    Time:2019-11-19

    #include#include#include#include#include#include#include using namespace std; int count=0;  typedef struct Note{  char path[50];  struct Note *next; }Note,*Lnote;  typedef struct Node {  char name[20];  unsigned int size;   struct Node *next;     }Node,*List;  List creat(void); void add(List *head,char *Tname,int Tsize); void bwrite(char *fn);  void file_in(char *Path_r,char *Path_w); void unzip(char *Path_file,char *Path_out); void lookthepack(char *path); Lnote Tcreat(void); void Tadd(Lnote *Thead,char *Path); void zip(char *ar1,char *ar2);     void lookthepack(char *path){  int i,j;  Node p;  FILE *fp;   if((fp=fopen(path,”rb”))==NULL){   printf(“Can’t open %s\n”,path);    exit(1);   }   fseek(fp,0L,SEEK_SET);    rewind(fp);   fread(&j,sizeof(j),1,fp);Printf (“the total number […]

  • C language realizes the examination system of primary school students

    Time:2019-11-19

    The example of this paper shares the concrete code of C language to realize the examination system of primary school students for your reference. The specific content is as follows Question and code: /*School of computer science, Yantai University Topic Description: make a primary school examination system, including the following functions: (1) using random number […]

  • Never seen such a handsome devil

    Time:2019-11-18

    Bubble sort Take random array #include #include #include #include int main() { int arr[10]; int i,j; srand(time(NULL)); for(i = 0;i<9;i++){ arr[i] = rand() % 100; } for(j = 0;j < 9;j++){ for(i = 0;i<9;i++){ if(arr[i] > arr[i+1]){ arr[i] ^=arr[i+1]; arr[i+1] ^=arr[i]; arr[i] ^= arr[i+1]; } } } for(i = 0;i<10;i++){ printf(“%d\n”,arr[i]); } return 0; } […]

  • Using C language to score pupils’ random questions

    Time:2019-11-18

    The example of this paper shares the specific code of random test scoring in C language for your reference. The specific content is as follows #include <stdio.h> #include <stdlib.h> #include <time.h> int test(); int checknum(int a, int b); int checkresult(int x); int a = -1, b, c, x; static int k = 0, grade; void […]

  • Why do Internet companies learn C language?

    Time:2019-11-17

    As one of the industries with the most “money scene” at present, let’s talk about how influential C language is in the Internet industry? Here I recommend my C / C + + language learning and communication autumn skirt. The top three are: 110The middle three are 355 and the last three are 025. There […]

  • The realization of CAI system for primary school students with C language

    Time:2019-11-17

    Develop a CAI system for primary school students. Use random book generation function to generate random numbers between 1 and 10 as operands, randomly generate a four arithmetic questions, and use switch statement and print() function call to output different evaluations for correct or wrong answers input by students. If the accuracy is less than […]