Function of STR and LPSTR

 Explain what is the function of STR and LPSTR?

E

Expert

Verified

STR is a datatype which has the storage allocation in place as well as it consists of the strings that are treated as an array.

a. They use pointer to point to the objects which is simple character.

b. The variable that is used with the data type is “sz” as it is a zero-terminated string that is a string which ends with a NULL character.

c. LPSTR is defined as Long Pointer to STR (string) and it is given as: #define STR * LPSTR;

d. This can be used to point to the string objects and it can also explicitly define the ASCII code rather than Unicode.

e. The variables are prefixed with “lpsz” and it involves the long pointer to the string which having zero-terminated.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.