C Primer Plus programming exercise Chapter 3 2 ~ 8
2. Write a program to prompt for an ASCII code value (e.g. 66), and then print the input characters.
#include <stdio.h>
int main(void)
{
char ch;
printf("Enter the ASCII:");
scanf("%d\n",&ch);
printf("The character is:%c\n",ch);
return 0;
}
Note: char type is also an integer type, so it can be input with% d conversion description ...
Posted by buceta on Wed, 01 Dec 2021 10:56:57 +0100
Easy Minesweeper Game
I believe that everyone has played a minesweeper game. After learning the two-dimensional array, I also wrote a simple Minesweeper game rule in c language as follows:
1. Set the game's board size by using macro Row and macro List (Row and List are 12 If you want to play 10x10 minesweeper);
2. Set the number of mines in the board by macro Boom ...
Posted by veroaero on Wed, 01 Dec 2021 06:59:05 +0100
Data structure | implementation of linked list
In the linear list, in addition to the important structure of sequential list, there is also the chain structure, which is also what we often call the chain list.
Generally, each node of the linked list is represented by defining a structure (class). Generally speaking, the nodes of the linked list will have data fields and address field ...
Posted by goldages05 on Tue, 30 Nov 2021 16:27:50 +0100
4, Notes on data structure of postgraduate entrance examination -- basic knowledge of stack and queue (understanding of stack and queue, confusing points, familiar code)
1, Refining the concept of stack and queue
Both stack and queue are linear tables with limited operation, which are linear structures. The logical structure is the same.The stack is summarized as LIFO (last in, first out); The queue is summarized as FIFO (first in first out)For the stack, n different elements, the number of different permutati ...
Posted by parag on Tue, 30 Nov 2021 15:58:55 +0100
[c project] design and implementation of Internet cafe management system
@
preface
This is a small project written in c in my freshman year, "the implementation of Internet cafe management system", which is provided for everyone to learn and use here
Main knowledge:
Creation and use of linked list
File operation
Application of various c statements
tips: when using, remember to add an Account library.txt ...
Posted by fernandodonster on Tue, 30 Nov 2021 05:42:09 +0100
C/C + + learning record
Pointer and array: (access array elements: through subscript / through pointer)
In the array, The array name is the first address of the array; In combination with the addition and subtraction of the above pointer, access the array 0
Pointer to array:
First declare an array and a pointer variable
int arr[10];
int *p;
Obviously, arra ...
Posted by plastik77 on Sun, 28 Nov 2021 10:46:40 +0100
Easily recognize the sequence list and linked list ------------ happy person's java beginner's diary [6]
1, Linear table
A linear list is a finite sequence of n data elements with the same characteristics. Linear table is a data structure widely used in practice. Common linear tables: sequential table, linked list, stack, queue, string... Linear table is a linear structure logically, that is, a continuous straight line. However, the physica ...
Posted by brokenshadows on Sun, 28 Nov 2021 05:12:35 +0100
[ten thousand people premise plan] exhaustive search of 100 cases of introduction to C language (case 27) - exercises (C language) (super simple and easy to understand) φ (゜▽゜*)♪
Article catalog
catalogue
Article catalog
Zero, write in front
1, The number of statistical digits is even
2, A single element in an ordered array
3, Adjust the array order so that odd numbers precede even numbers
Zero, write in front
This chapter is just a review: this chapter mainly describes the methods of exhaustive search
[questi ...
Posted by mcmuney on Sun, 28 Nov 2021 04:53:14 +0100
4,000-word detailed block search
Ideas for Block Search
Before explaining the blocking algorithm, let's introduce the concept of blocking lookup
Concepts: Block lookup, also known as index order lookup, requires an index table based on the lookup table in addition to the algorithm implementation. Given a lookup table, its corresponding index table is shown in the figure ...
Posted by miles_rich on Sat, 27 Nov 2021 18:06:53 +0100
[C language] super detailed -- sanziqi game -- implementation and analysis
[C language] super detailed -- sanziqi game -- implementation and analysis
This time I learn to write a Sanzi chess software, which basically uses all the knowledge I have learned before. Now I begin to analyze this Sanzi chess game.
Three pieces of chess are composed of: chessboard, our chess and opponent's chess. It consists of three parts. ...
Posted by spicerje on Thu, 25 Nov 2021 02:04:52 +0100