LoadRunner: knowledge of simple C Language

Source: Internet
Author: User

1. * usage of pointers

Int * p = 0; or int * p = 0 ;? The latter is easier to understand: defines a Variable P, which is pointer-type (more detailed, it is pointer-type pointing to int, the previous definition seems to define the strange thing * P. However, the next write method will bring about an easy misunderstanding: int * P1, P2; here it seems to be the definition of two pointer variables P1 and P2. However, in fact, this intuition is wrong. The correct understanding is int * P1, P2; that is, P1 is pointer type, while P2 is indeed Integer type. In Ms VC ++ 6.0, it is written in the following format. 2. strcmp is used to compare two strings. The data obtained through the association function cannot be determined by "=". In this case, strcmp is usually used.
Web_reg_save_param ("result", "lB = {", "RB =}", last); // works with web_reg_save_param checkpoint if (strcmp (lr_eval_string ("{result }"), "\" issuccess \ ": True") = 0) {lr_end_transaction ("score_add_insert", lr_pass); lr_output_message ("Call successful! ");} Else {lr_end_transaction (" score_add_insert ", lr_fail); lr_output_message (" Call failed! ");}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.