c Language String Operation

(Header file is required for all of the following operations) ok let`s go! Part 1. Find the length of the string strlen const indicates that you cannot modify what the pointer is pointing to. 6 (found\0) ps. Make your own strlen using a function! (Below) ​ #include unsigned UTF-8...

Posted by tsigo on Sun, 26 Sep 2021 22:07:41 +0530

C language fgetc and fputc function usage details

When reading and writing a file as characters, you can read one character from the file or write one character to the file at a time. Two functions are mainly used: fgetc() and fputc(). Character reading function fgetc Fgetc is the abbreviation of file get char, which means to read a characterUTF-8...

Posted by vaanil on Sun, 26 Sep 2021 23:30:56 +0530

An article plays with C language dynamic memory and easily manages dynamic memory space

1. Reasons for the existence of dynamic memory allocation When we generally define variables, we often use the following expression: char str;//Open up 1 byte of memory space on the stack int num;//Open up 4 bytes of memory space on the stack int arr[10];//Open up 40 bytes of continuous space UTF-8...

Posted by mooshuligan on Sun, 26 Sep 2021 23:56:17 +0530

C language file operation

This section discusses the file operation in C language. catalogue 1, Open file 2, Input data 2.1 characters 2.2 text lines 2.3 formatted text 2.4 binary 2.5 sscanf and sprintf 1, Open file To open a file is to obtain information about the file, This information will be saved to a structure varUTF-8...

Posted by ukspudnie on Mon, 27 Sep 2021 06:11:25 +0530

C language highlights --- initialize the specified structure array members

Initializes the specified struct array member summary Today, when looking at the code of iwlib Library (an open source wifi Driven Management Library Based on wext, which can support us to carry out some convenient operations on wifi at the application layer), I found a more useful method for iUTF-8...

Posted by slewis1959 on Mon, 27 Sep 2021 13:33:27 +0530

FatFs directory access interface Chinese version

File and directory management f_stat - checks whether a file or subdirectory exists Function prototype FRESULT f_stat ( const TCHAR* path, /* [IN] Object name */ FILINFO* fno /* [OUT] FILINFO structure */ ); Formal parameter path Pointer to a null terminated string that specifies the object whoUTF-8...

Posted by Komodo on Tue, 28 Sep 2021 12:58:22 +0530

Advanced C language: dynamic memory management

Dynamic memory management Significance of dynamic memory allocation When we create variables with types such as int and char, the space opened up is fixed. The purpose of developing dynamic memory is to use memory flexibly to meet the needs of programs. In language learning, the memory is diviUTF-8...

Posted by deezzer on Wed, 29 Sep 2021 00:46:41 +0530

Depth analysis of C language format input and output

The so-called data input and output is from the perspective of computer. C language itself has no I/O statements, and all I/O is realized by functions. Standard library functions of C language A series of functions provided by the compiling system are stored in the system in the form of librarUTF-8...

Posted by RP on Wed, 29 Sep 2021 01:15:41 +0530

Minimum spanning tree Prim algorithm C language - diagram

Algorithm Introduction Prim algorithm (PRIM algorithm), an algorithm in graph theory, can search the minimum spanning tree in the weighted connected graph. That is, the tree composed of edge subsets searched by this algorithm not only includes all vertices in the connected graph, but also the UTF-8...

Posted by zalath on Thu, 30 Sep 2021 04:34:02 +0530

Blocking IO and non blocking IO

Blocking and non blocking IO Everything can be blocked or non blocked Concept of blocking: What is blocking Because some resources and conditions were not reached, the process stalled Cost of blocking Wasting time, like sleep, wastes system resources Non blocking concept: What is non blocking: UTF-8...

Posted by varun_146100 on Fri, 01 Oct 2021 02:20:36 +0530