Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

结果为什么不同?高手进

Posted by aiyinsitan at 2007-12-21 17:15:13
下面代码1 2为什么输出结果不同呢?
实在是搞不懂。
1
#include<stdio.h>
struct node
{
    node *lc,*rc;
    int head,tail;
};
node *w;
int main()
{
    
    w=new node;
    printf("%d\n",w->lc);
    scanf("\n");
    return 0;
}
2
#include<stdio.h>
struct node
{
    int head,tail;
    node *lc,*rc;
};
node *w;
int main()
{
    
    w=new node;
    printf("%d\n",w->lc);
    scanf("\n");
    return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator