-
To put it simply, the data that can be read and written can be managed as files.
To put it simply, when you write an essay, it is called writing a document, and when you read an essay, it is called reading a document.
The computer is the same, you transfer the data to it to write the file, you take the data out is to read the file, no matter what the medium of the data is stored, just like your composition text is a kind of device, you can simply treat the printer as a composition book.
A disk file is a file on a disk, not necessarily a hard disk, but also a floppy disk.
-
Computers use buses to connect devices together, and there is no difference between getting information from a hard disk and getting information from a network card. Whether it is manipulating disk files or devices, it is actually a process of reading and writing. You can think of the device as a file or as a device (virtual).
A disk file is a file on a disk. Corresponding device file.
-
1.The final meaning is that when a program is processed, writing files to disk is the same as writing files to printers.
2.Disk files are files that already exist on your hard drive.
e.g., c: file.
-
1.*p p is a field pointer and does not have an address, so it cannot be assigned *(s+i) to refer to s[i].
p=&p;So **p==*p;
ps refers to the first address, ps+2 refers to the address strcpy(s1,s2) of s[2], which assigns s2 to s1, strlen(s2)=4;So the result is 4;
p+2=a[2];p++) means that *p is output first, and then p is added;
p+5)=s[5];s[5]='\0';
ptr+1)=s1[2]='2';
11b int a[10];Array elements have a[0], a[1].a[9], without a[10].
If there is anything else you don't understand, you can ask.
-
If you can't explain it clearly, I recommend you find a copy of Tan Haoqiang's C language Greenskin's that speaks very clearly.
-
Find a C language book and take a look.
-
The analysis is as follows.
The first cycle.
y=1. y=((x=3*y,x+1),x-1);
This sentence is syntactic.
First of all, it is clear that the assignment sign "=" takes precedence over the comma expression operator "no", and the comma expression takes the value of the rightmost expression.
x=3*y), x+1 This expression first calculates x=3*1=3, and the value of the comma expression is the value of x+1 on the far right, which is 4 (note that the value of x is 3).
y=(4,x-1);The comma expression in () to the right of this expression is 2 if the value is x-1
So y = 2
the second loop (actually x+1 is a distractor, because the comma expression has a point x+1 that doesn't actually work, y=((x=3*y,x+1),x-1); It can be simplified to y=((x=3*y),x-1).
y=2 is similar to the same analysis.
x=3*2= 6
y=(7,x-1)
y=5 The third cycle is directly analyzed with the simplified y=5x=3*5=15
y=14 does not satisfy y<10 cycle ends.
The output x is 15 and the y is 14
The above analysis is OK with C-free running and actual measurement
-
#include
#include
void fun (char*p) receives the first address of the str array}main().
islower() determines whether it is a lowercase letter, if it is true, otherwise it is false p[i-1]=p[i-1]-'a'+'a'Such as:'b'='b'-'a'+'a'=1+'a'='b'
Hope it helps.
-
In the C language, you can add a "" sign to the format characters of the input and output
1. It has no effect on %c, %s, %d, and %u format characters (it is the same whether you add or not).
2. Add a sign (% o) to the %o format characters, and the system will add the numeric prefix 0 representing the octal when outputting (i.e., for the octal number 17, 17 is output when %o is output, and 017 is output when %o).
3. Add a sign (%x or %x) to %x or %x format characters, and the system will add a numerical prefix 0x or 0x representing hexadecimal (i.e., for hexadecimal numbers 3e, 3e is output when %x is output, and 0x3e is output when %x).
4. For %e, %g, %f format characters, if the plus sign, when the result has a decimal value after the decimal point, the decimal point is given.
I don't know if it's clear?
-
Answer: C and D.
If the statement is true, it is true (1), and if it is not true, it is false (0), explanation: item a: first determine whether 9 is equal to 0, 9 is not equal to 0, it is false (that is, 0), and there is another one!
Non) is true (i.e. 1), and then ||(or), or means to judge whether the previous expression is true first, and if it is true, it is not necessary to judge the latter expression, and conversely, if the previous expression is false, the latter expression is judged. The next thing is && (and), 3>1 is true, so the real expression is true (1).
Item B: % (remainder), which means how much is left after 9 divided by 5, and then judge whether the remainder is equal to 5, and find that it is equal to 5, and the expression is true (1).
Item C: The first expression is false (0), &&& and only the previous expression is true to judge the following expression, otherwise, it is not necessary to judge the later expression. The whole expression is false (0).
Item d: The previous expression is true (1), above, > 2'1','1'is a character, the value is 49, it is not true, it is false (1), and the whole expression is false.
If you don't understand, you can ask.
-
c 9==0 is 0 is 0 0&&0 result = 0
d !(2>2) is 1 2 >'1'is 0 1&&0 result = 0
-
&> Yes, as long as one of the two is not true, it is not true.
c.(9= =0)&&= =1) 9 ==0 is not true, so it is 0
d. !2>2)&&2>’1’) //'1'It's a character so you have to look at the ascll code, it's 49 So, 2 > 49 doesn't hold, it's 0
-
Calculate and output numbers between 100 and 150 that are divisible by 3, in a row of 10.
-
This is the relationship between the structure and the common body, basically this structure is that each byte has its own internal error space, and the common body is all the functions, a piece of no space, you now assign a value of 1234, that is, the common body is 1234, because the whole common body is in the memory applied for by word, that is, 4 bytes, the first two bytes of the four bytes are occupied by the structure, that is to say, low and high each occupy one, and the printing result is: word= 1234, high=03, low=04, the last one is 12ff Hope it helps.
Indicates that the remainder of 6 is taken.
In the C language, % stands for remainder (or modulo operation). >>>More
This is an additive function I wrote that can judge overflow: >>>More
Valid variable names for the C language:
First, it can only contain numbers, letters, and underscores. >>>More
It seems that you don't know much about structs and struct pointers, the data array is a struct array that you define, it consists of two knot body elements, and each struct element contains two members x and y, the first element is 1 and 10, the second element is 2 and 20, the struct pointer p you defined starts to point to the first element of the array data, p points to the second element of the data array, and the pointer p can manipulate the two members x and y >>>More
Illegal. First of all, if int() is a function, it is obviously a duplicate of the keyword, so it is not a function. >>>More