Help me analyze these C programming statements in detail

Updated on technology 2024-04-08
3 answers
  1. Anonymous users2024-02-07

    It is a system file that provides functions such as input and output. The include statement is used to include this header file in the program. The effect of j*=-1 is to change the positive and negative of j.

    sum +=i*j;The function of this sentence is to add the result of multiplying i and j to sum each time. In the end, sum will be equal to 1-3+5-7+......99。for the output content.

    i-3+5-7+……99= is a string. It will be displayed on your computer. d is the format of the sum output.

    i.e. output in decimal form. i should be 1. It's a mistake.

    The second one is simple. It's bubbling sorting. Sort the 10 numbers from smallest to largest.

  2. Anonymous users2024-02-06

    Faint to death, I don't understand so much, most of these books are available.

    There is less explanation in the include book, so let me explain.

    include is to add the contents of this file as it is, called a header file, why include it? Because we use the printf function in our program; The definition and declaration of this function are in the header file.

    void is used to declare a valueless type.

    For example, using void to declare a function indicates that the function has no return value.

    void main()

    define is used to define a macro.

    For example, define abc 123

    Once the macro is defined, the compiler replaces all abc in ** with 123 before compiling

  3. Anonymous users2024-02-05

    <>Open Quality Check. txt" code piece;

    Write data from the information structure to the file.

    If you reach the end of the file, quit.

    Information attributes include id and name, and the specific meanings must be referred to the relevant documentation or the definition notes of information.

    Structs: In C, a struct is a data structure, which is a class of aggregated data types in C. Structs can be declared as variables, finger pins, arrays, etc., to implement more complex data structures.

    A struct is also a collection of elements that become members of a struct, and these members can be of different types, and members are usually accessed by name.

    Structs are the same as other types of underlying data types, such as int and char, except that structs can be made into the data type you want. for easy future use.

    The role of structs in functions is not to change gradients, but to encapsulate them. The benefit of encapsulation is that it can be reused. So that the user doesn't have to care what it is, just use it according to the definition.

    In real projects, structures exist in large numbers. Structs are often used by developers to encapsulate properties to compose new types, but because C internal programs are relatively simple, developers usually use structs to create new properties in order to simplify operations.

Related questions
9 answers2024-04-08

Men, just have a little depth, maybe he is more introverted, not good at expressing himself, if he cares a lot about other people's eyes, but wants to get close to you intentionally, that is introverted, if he has fun with boys, and girls don't like to talk is nervous about the opposite sex, if he is hot with anyone, he is cold to you, then there are two possibilities, a he cares about you but cares about other people's eyes, b he doesn't care about you, but it takes time,

9 answers2024-04-08

If you have encountered such a problem before, you should not be frightened by the words "specific analysis principle" of specific problems, to put it bluntly, it is to analyze your results as usual. For example, your overall view of the grades, specifically analyze the situation of your papers, the learning situation, this can be done very simply, and today's teachers often ask students to do these useless work, you can just write and deal with it. >>>More

4 answers2024-04-08

Advantages: C500: S60V3 system, powerful expansion function; The 3.2 million pixel camera is the best of the three; screen size, 16 million colors; Stainless steel back cover, abrasion resistant. >>>More

25 answers2024-04-08

There is no such fixed routine, it is necessary to have and far-fetched, write the data that can be obtained according to the topic, look at the data, and transform it into other data, according to the problem, the main thing is the sea of questions.