Three C/C++ Programming Questions# Programming - 葵花宝典
j*z
1 楼
Can anyone help me to answer the following questions:
1) Given the following code snippet, what does the function DoesWhat() do?
And what, if any, assumptions are made about the input to the function.
struct _tagElement
{
int m_cRef;
unsigned char m_bData[20];
struct _tagElement * m_next;
} NODE, * PNODE;
PNODE DoesWhat (PNODE pn1, PNODE pn2)
{
PNODE * ppnV = &pn1;
PNODE * ppn1 = &pn1;
PNODE * ppn2 = &pn2;
for ( ; *ppn1 || *ppn2; ppn1 = &((
1) Given the following code snippet, what does the function DoesWhat() do?
And what, if any, assumptions are made about the input to the function.
struct _tagElement
{
int m_cRef;
unsigned char m_bData[20];
struct _tagElement * m_next;
} NODE, * PNODE;
PNODE DoesWhat (PNODE pn1, PNODE pn2)
{
PNODE * ppnV = &pn1;
PNODE * ppn1 = &pn1;
PNODE * ppn2 = &pn2;
for ( ; *ppn1 || *ppn2; ppn1 = &((