Question: Create a conditional expression that evaluates to string negative if userVal is less than 0, and non-negative otherwise. Ex: If userval is -9, output is:

 Create a conditional expression that evaluates to string "negative" if userVal

Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "non-negative" otherwise. Ex: If userval is -9, output is: -9 is negative. 1 #include #include 1 test passed 4 int main(void) { char condStr[50]; int userval; All tests passed NM+in00OON scanf("%d", &userval); strcpy(condStr, /* Your solution goes here */); printf("%d is %s. ", userval, condStr); return 0; 15 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!