I don t understand a small program.,How about a small program.

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

    There is no contradiction, the types are matched. Added a note to your **, if you still don't understand, you can ask me again!

    #include

    main()

    Declaring functions. int fun(int *,int);

    The variables j,m,k are declared, and the variables j are assigned a value of 4, m is assigned a value of 1, and the value of k is unknown.

    int j=4,m=1,k;

    Call the function.

    k=2+(4+1);So the value of k is equal to 7

    At this time, in the function fun, the value of j is changed, j=7-1; Therefore j=6;

    k=fun(&j,m);

    Print the value of k: The First K:7

    printf("the first k:%d",k);

    Call the function again.

    k=7+(6+1);So the value of k is equal to 14

    At this time, in the function fun, the value of j is changed, j=14-1; Therefore j=13;

    k=fun(&j,m);

    Print the value of k: The First K:14

    printf("the second k:%d",k);

    A function is defined, and the parameters of the function are a pointer variable of type int and an int integer.

    int fun(int *x,int y)

    For static int inter variables, after the function is run once, the value of k of the last run of the function is retained unless the main function ends.

    static int k=2;

    *x is an indirect access to the pointer variable x, reading the value of type int stored on that address.

    This statement is equivalent to k = k+(*x+1);

    k+=*x+1;

    The following statement changes the value of the address to which the first argument of the function is passed.

    x=k-y;

    The value of k is returned, and the function ends.

    return k;

  2. Anonymous users2024-02-06

    main()

    int fun(int *,int);The fun function, which accepts an int*, and an address with real space, accepts an int type.

    int j=4,m=1,k;

    k=fun(&j,m);Enter the spatial address of the j variable, the m variable.

    printf("the first k:%d",k);

    k=fun(&j,m);Ditto.

    printf("the second k:%d",k);

    int fun(int *x,int y) states that the static local variable k is not released at the end of the function, but at the end of the program.

    The declaration is not repeated when called again, it is always unique!!

    static int k=2;

    k+=*x+1;It means k=k+((x)+1); *x is the spatial value of x, i.e. the variable j = 4.

    x=k-y;Equivalent to j = k-y

    return k;Return the int type, note that if k is not a static variable, the end of this function will be released, and an error will occur, so it must be static

  3. Anonymous users2024-02-05

    There is no contradiction, int * declares the type of the shaping pointer, that is, the pointer to the shaping data data, which can also be understood as its value is the address of the shaping data; And the &j in k=fun(&j,m) is the address of j (integer data), so the type matching, no problem.

    The reason why int *x is used in the int fun(int *x,int y) parameter is to pass the address of the parameter when adjusting the function, that is, to pass the parameter itself, not its copy, after the function is executed, the content of the parameter also changes, such as k=fun(&j,m), after the function is executed, it is equivalent to executing:

    k+=j+1;

    j=k-y;

    As for the rest, you can understand it.

  4. Anonymous users2024-02-04

    int fun(int *,int);

    The position of this sentence is a bit strange.

    There are two arguments to the fun function: the first is an int pointer, and the second is an int. The pointer indicates that it points to a certain piece of memory, that is, the address of that piece of memory, so the address & should be used here, so there will be no problems.

  5. Anonymous users2024-02-03

    The int* in the fun function means that what is needed is an integer address, and &j is the address of the integer variable j, and the answer is an int* address, which just meets the requirements, what is the contradiction?

  6. Anonymous users2024-02-02

    A variable preceded by * represents a pointer, which is also a variable and is used to store an address. > Used to obtain the address of the memory space stored by the variable. Both are addresses, not contradictory, and the two types match.

  7. Anonymous users2024-02-01

    Some parts of the machine will definitely change after a long time, so this is a normal thing, as long as it can meet your use requirements, there is no need to have a deeper discussion on this issue, the computer is just a tool, if it is broken, it will be replaced, it is very simple.

  8. Anonymous users2024-01-31

    Hello, the WeChat Mini Program must be completed and registered before it is developed. If you are an individual or a small company that wants to develop a WeChat mini program, you can also find a third-party developer certified by WeChat, such as Win in Mobile, ** Technology, etc.

    **, **, and other organization types of accounts must verify the identity of the subject through WeChat authentication. For enterprise accounts, you can determine whether to apply for WeChat authentication as needed. Verified accounts can use advanced permissions such as WeChat Pay and WeChat cards and coupons.

    After the Mini Program is bound to the WeChat Open Platform account, it can be connected with other mobile applications, **applications and *** under the account, and meet the needs of unifying user accounts between multiple applications and *** through the UNIONID mechanism.

    UnionID mechanism description: If a developer has multiple mobile apps, apps, and Official Accounts (including Mini Programs), the UniId can be used to distinguish the uniqueness of users, because as long as it is a mobile application, an application, and an Official Account (including Mini Programs) under the same Weixin Open Platform account, the user's UnionID is unique. In other words, the same user has the same UnionID for different applications under the same WeChat open platform.

    You can obtain the UnionID of a user by calling the API for obtaining user information.

    5. To understand the "Get User Information" interface, please refer to the development documents - API - Open Interface - User Information.

  9. Anonymous users2024-01-30

    Mini programs are likely to be the main form of mobile Internet applications in the future, and they are characterized by being small and fast. It was born to help users solve some special needs, such as taking congratulations when users have no time, want to control the memory space of their mobile phones, don't want to download apps, and so on.

    The author believes that there are the following types of Mini Programs that are more valuable.

    Take a restaurant as an example, for them, it is very unrealistic to make an app. Replaced with a small program, consumers can directly see the menu by scanning ***, complete the process of ordering and shopping, etc., which is convenient for consumers.

    In addition, post-purchase retention information helps merchants directly understand users' spending habits and preferences. In this way, targeted recommendations, induce purchases, discounts and other activities can greatly improve user stickiness.

    + Mini Program Tool ClassThe most applicable scenario of the Mini Program tool class should be "just need" and "low frequency", when the user does not have the App, and does not want to install the App, but wants to experience ** booking, does not want to queue, does not want to pay cash, the tool Mini Program can play its maximum value, such as want to ride a shared bicycle, and users who do not have the App installed can also achieve their purpose through the Mini Program.

    Although the life service applet is very similar to the tool class, the application scenarios of the life service applet are richer, and the frequency of use will be higher than that of the tool class, the main feature is "timely", when the user wants to know today's weather, wants to know the road conditions at the moment, and wants to know when the next bus will come, they will have a little desire to open the applet.

    Google and Alipay have proposed or are doing small programs, and light applications are the norm that came into being in the times, which meets the fragmented and diversified needs of current users, and then evolves into the technological evolution trend of the mobile Internet and the trend of user use.

    In the future, Mini Programs will play a more convenient and effective role in scenarios such as commercial consumption and group interaction.

  10. Anonymous users2024-01-29

    The effect of the mini program is very good. The second only one is characterized by lightness, and the entire application is not as much as 2m. Now Meituan's store and SF Express have entered the mini program.

    Questions. How to promote personal mini programs will have a better effect.

    1.Community, circle of friends to share.

    WeChat groups are natural traffic aggregation pools, and Mini Programs rely on the WeChat ecosystem to have natural social advantages. Therefore, merchants can pull a few more fan groups and share the Mini Program in the WeChat group, so that fans can spread independently. When there is a new product launch and a new marketing campaign, it will be notified in the group to attract fans to place an order and shop.

    If you just use a mini program to sell goods, it may be difficult to impress new customers. Therefore, you try to write as many interesting tweets as possible to attract customers' attention and buy your stuff. Merchants can open *** and associate their own Mini Programs, set up Mini Program entrances at the bottom of the Mini Program, insert Mini Program cards into articles, etc., strengthen contact with users, and use *** tweets to promote conversion.

    3.Jump between the Mini Program and the Mini Program.

    If there are many products, then you can make a small program for different types and brands of products, and then jump to each other; Or cooperate with other well-known brand mini programs to guide each other's mini programs. As shown in the figure below, you can use the online Mini Program tool to do a good job of jumping to facilitate the promotion of Mini Programs.

    4.Carry out a variety of ** activities.

    Do you still remember how Pinduoduo is popular, merchants can also follow this group model, guide customers to share, and achieve analysis fission. In this way, a large number of users can be accumulated in a short period of time. In addition to this, you can also attract customers with marketing methods such as distribution, full discount discounts, etc.

    Questions. Ok thanks.

    You're welcome and I wish you a happy life and all the best.

Related questions
18 answers2024-04-08

There are several ways to create a store mini program, which you can choose according to your actual situation: >>>More

7 answers2024-04-08

1. Look at whether the company has an official **, if an Internet company does not even have **, then it is conceivable that the possibility of a leather bag company will be greater. >>>More

13 answers2024-04-08

There are generally two ways to develop Mini Programs: template development and custom development, and the standardized Mini Program you mentioned should be template development. >>>More

14 answers2024-04-08

public static int m2(int f, int k) {

This method needs a return value, you define an int type, it needs an int return value, the method itself just prints f, nothing can be returned, you can change the return value type to void, you can also add return null to the method; >>>More

4 answers2024-04-08

At present, there are many Mini Program development companies, and how to choose a good and powerful Mini Program development company can be considered from the following aspects: >>>More