I m a beginner in C. Ask

Updated on technology 2024-05-13
8 answers
  1. Anonymous users2024-02-10

    What does a++ b++ mean?

    Affixing ++ means that the value is returned first, and then it is incremented.

    a=1;b=a++;

    Thereafter, a=2 |b=1 because a returns the value to b. before +1

    Rear - the same, just replaced with -.

    And the other one is ++a or what does ++b mean?

    The pre-++ is to increment itself first, and then return the value.

    a=1;b=++a;

    Thereafter, a=2 |b = 2 because a did a +1 operation and then sent the result to b

    The front - the same, just replaced with -.

    printf("a=%d,b=%d\n",a,b);What does the beginning of this paragraph mean in parentheses?

    printf is a built-in function in C""What's inside is the content that is output to the terminal, and %d is the output format that controls the variables that follow.

    In this sentence, a=%d [this %d is replaced by the value of a], and b = %d [this %d is replaced by the value of b].

    There are also some symbols in the C language how to type.

    Symbols can be printed directly or the int type can be forcibly output as a character type.

    printf("+");Output+

    printf("@");Output+

    printf("%c", 97);The output A, A's ASCII code is 97

  2. Anonymous users2024-02-09

    Let's talk about ++ first. First of all, I would like to say. The essence of an operator is a function.

    That is, if you run a++, it is actually an int (+int x) function (you can think of ++ as a function name).This is a function with a return value. After++ returns values before +1, while post++ returns values after +1.

    Of course, after doing the ++ (whether pre-or post) arithmetic, the value of a is added by 1

    e.g. a = 1; b=a++;After that, b=1, and a=2; And if b=++a; then b=2, a=2;

    printf("a=%d,b=%d\n",a,b);What does the beginning of this paragraph mean in parentheses?

    This is the basic syntax. If you just look for a textbook of C, it will be very clear.

    In addition, I recommend Tan Haoqiang's textbook, which is more popular, maybe what you need.

  3. Anonymous users2024-02-08

    a++ b++ is used in the calculation first.

    For example. a=1;

    c=a++;

    Results: c=1;

    a=2;+a, ++b are calculated before use.

    a=1;c=++a;

    Results: c=2;

    a=2;printf("a=%d,b=%d\n", a, b) printf is a function in the C standard library, which is used to format the output. The first parameter is the output format, ie"a=%d,b=%d\n"

    It indicates that the output format is a=second argument and b=third argument wrapping.

    d indicates that the output is integer.

    n indicates a line break.

    The second and third parameters are used to replace %d in the previous format in turn.

    Got it?

  4. Anonymous users2024-02-07

    Ah, your question is too difficult, too much, I hope you can give me extra points.

    A++ and ++A have roughly the same meaning, both say a=a+1, their difference is that assuming a=1, b=a++, at this time, the value of a should be assigned to b, b is equal to 1, and then the value of a is added to 1, a is equal to 2; Suppose a=1, b=++a, at this time, the value of a is added to 1 first, a is equal to 2, and then the value of a is assigned to b, then the value of b is also equal to 2.

    printf("a=%d,b=%d",a,b) This is an output statement, the %d in parentheses is the format specifier, indicating the integer data, this sentence is a is equal to %d, %d corresponds to the variable a outside the quotation marks, and then I gave the example above, the output result is a=2, b=2

    n means line break.

    Actually, you said that you are a beginner in the C language, it seems that you have not been in class for a few days, these are the most basic things, the %d I mentioned above means the output integer data, and %f, %u, %x, etc., you still need to know more.

  5. Anonymous users2024-02-06

    There is a book on it, take a good look at the book. A++ is to use a first and then calculate.

    c language symbols on the keyboard. For example, * is shift+8.

  6. Anonymous users2024-02-05

    First of all, you have to understand that the "=" sign in the C language does not mean equal, but the value (value) on the right side of the "=" sign is given (given, you can also understand "fu" as the meaning of "copy"; albeit non-canonical) to the left;

    a++ means +1 on the basis of A itselfThe same goes for b++, if a=2;Then a++ is 2+1;

    A also means +1 on the basis of A itself;Ditto;

    If "++ followed by "=" appears in an expression; Then a++ and ++a are different;

    Assuming a=3;then b=a++ means that the value of a (for 3) is assigned to b, and then on the basis of itself (for 3) +1, and finally the value of b is 3, and a is already +1, so it is 4;

    Assuming a=3;then b=++a means that a assigns the result (4) to b on the basis of +1 on the basis of itself (for 3); At this time, the value of b is 4, and a is already +1 is also 4;

    In a word, ++ is +1 in the front, and then gives the value after +1 to others, and in the back, first gives the value to others, and then +1 itself;

    printf("a=%d,b=%d\n",a,b);It is an output function, and everything in the double quotation marks of this function is to be output to the screen;

    The first %d represents the first expression (or character) after the double quotes;

    Similarly. The second %d represents the second expression (or character) after the double quotes;

    And so on; Symbols in the c language are output from individual numeric keys in the case of English input;

    For example, % is shift + 5 in the case of English input

    C symbols are generally shift + number keys (the number keys above the letters of the keyboard) can be entered, or do not shift;

    There are also punctuation marks to the right of the keyboard letters;

  7. Anonymous users2024-02-04

    Speechless. Don't you understand anything about it? Take a good look at the book.

  8. Anonymous users2024-02-03

    It is recommended to find a book on the C language first and learn the basic concepts. It is important to get on the plane, but the foundation is even more important, how can you run without two legs to stand up.

Related questions
17 answers2024-05-13

string a = "a,b,c";

string arr = ',');Based on the comma, it is divided into an array of strings, and the contents of the array are three values: a, b, and c. >>>More

7 answers2024-05-13

Halo,This is going to use the ASCII code,You have to check the table below,Find out which value ranges the large letters and lowercase letters are in,And then use the comparison to judge the statement or add or subtract it.,I won't write the specific program.,There's no table in hand.,I don't know the value range!!

18 answers2024-05-13

First of all, the defender, if a beginner has figured out their own positioning, then they can train with a purpose, and they can improve faster. The type of guard generally focuses on the ball control training of the left and right hands and the layup of the left and right hands, and the general training method is as follows: (the daily training time is not much, about an hour and a half can be completed, but the focus is on persistence, not how hard the training is). >>>More

16 answers2024-05-13

You should buy a book called "Scales and Arpeggios", which contains scales and arpeggios of various keys, and if you are serious about learning, spend at least 15 minutes practicing 1-2 scales and arpeggios before each practice. When practicing, there is a skill, play the left hand alone, then the right hand alone, and then together. Then play the equal rhythm scale into a dotted one, that is, between two adjacent notes, play one long and one short, so that after practice, then play two long and one short, three long and one short, five long and one short. >>>More

9 answers2024-05-13

Hello, yin and yang is a philosophical concept, not something concrete. The ancient naïve materialist thinkers summarized everything in the contradictory movement into two opposing categories, "yin" and "yang", and explained the movement and change of the material world with the principle of change between the two sides. For example, day and night, they alternate, the day is yang, and the night is yin; Heaven and earth, heaven belongs to yang, then earth belongs to yin; Men are yang and women are yin. >>>More