-
#include
#include
typedef struct node
node;Linked list output.
void output(node *head)
printf("");
Linked list is created.
node* creat()
head->pstnext = null;
p = head;
while(cycle)
s->ndate = date;
p->pstnext = s;
p = s;
elsep->pstnext = null;
return(head);
Linked lists are searched by value.
void research_date(node *head, int date)
if(null == p)
else if(date == p->ndate)
return;
Search by serial number.
void research_number(node *head, int num)
if(p == null)
else if(i == 0)
else if(i == num)
Inserts a new node before specifying an element.
void insert_1(node *head, int i, int newdate)
if(null == pre ||j > i-1)
elsenew->ndate = newdate;
new->pstnext = pre->pstnext;
pre->pstnext = new;}}
Inserts a new node after the specified element.
void insert_2(node *head, int i, int newdate)
if(j == i)
new->ndate = newdate;
new->pstnext = pre->pstnext;
pre->pstnext = new;
else deletes the specified node.
void delete_1(node *head, int i3)
if(null == p)
elsevoid main()
-
You have to find the engine in C that embeds SQL (it should actually be a library).
Then you can use SQL, and what to do next, it should be relatively simple.
-
This line**: array=(structure record*) malloc(sizeof(structure record)*num); is the memory structure record type of the application, which you define as int*, so interpret the *array into a structure record* array, and put the other definition of the outer num and I don't record the definition together, otherwise, the same type and record, are independently defined as: integer number, scanf function ("c", with array [i] coefficient); Reform to the scanf function (in "f", the array is determined by the [i] coefficient).
-
Your question is very vague, please make the form clearer.
-
Required:
Basic syntax, definition, assignment, input and output, loop, judgment, basic operation file operations: addition, deletion and modification.
Data structures: pointers, linked lists, structs.
Sorting: At least bubbling up.
Basic structure: 1) Input part, input data, logical judgment, file processing (scanf, gets, if-else, file) 2) part, file processing output data + input data.
scanf,gets,printf,file)3) query part, file processing sorting processing + logical judgment + input data output data (..
4) Optionally, the bottom layer of the database is a set of functions that provide interface functions for adding, deleting, modifying, and querying.
-
It depends on how your data is stored!
-
e.g. struct student s[10];
If you want to delete s[5], just move the next element forward to overwrite the previous element, and then the last element is not used!
-
If you want to delete a member of a struct, you can only delete it where it was declared.
-
You can follow the steps below to define a two-dimensional array and output:
1 Define a two-dimensional pointer.
2 Determine the number of array dimensions, i.e., the number of rows and columns.
3. Apply for several 1D pointer size spaces in the row, and assign values to 2D pointers.
4 For each one-dimensional pointer, apply the space of several elements in the column and assign a value to the corresponding one-dimensional pointer.
5 Enter or assign data.
6 Using a double cycle, the range of storage cells and output them one by one.
7 Free up memory on the 1D pointer one by one.
8 Free up memory on the 2D pointer.
Take an integer two-dimensional array as an example:
In the following **, the number of rows m and the number of columns n of the two-dimensional array are first entered, and then m*n integer data is entered into the dynamic two-dimensional array. Finally, the element values of all 2D arrays are output.
It's called the [batch] program, in fact, don't think that the program you mentioned above to deal with garbage is really powerful, it's amazing, when you have learned DOS, that program can be said to be a very simple thing; >>>More
int main()
int i,j,k; >>>More
In C, you can't actually get carriage returns with any method (regular library functions). Because the console is after you enter a line and click enter, send the characters other than the enter to the program input cache together, you can only use workarounds, such as getting a line, a character or a number at a time, and setting multiple inputs, then after entering, it will inevitably go into the next input or ** block. >>>More
Humorously introduce yourself in short sentences that are as follows:1. Every time I walk alone at night, I'm so scared, it's so dark, I'm so handsome, I'm afraid that others won't see it. >>>More
I want to ask, have you written it now?