单项选择题

设int n,p=0;,与语句if(n!=0)p=1;等价的是( )

A.if(n)p=1;
B.if(n=1)p=1;
C.if(n!=1)p=1;
D.if(!n)p=1;