编程知识 cdmana.com

Please answer the following multiple-choice questions about C language

if x>=0 yes ,y=1,x<0 when ,y=-1, The following error segment is ().
A.
if (x>=0) y=1;

if (x<0 ) y=-1;

B.
y=1;

if(x<0) y=-1;

C.
if(x>=0) y=1;

y=-1;

D.
if(x>=0) y=1;

else y=-1;




Refer to the answer 1:

C




Refer to the answer 2:

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/11/20211117141443140u.html

Scroll to Top