Question: In C please. NOT in C++ or Java CHALLENGE ACTIVITY 3.15.2: Conditional expression: Print negative or positive. Create a conditional expression that evaluates to string

 In C please. NOT in C++ or Java CHALLENGE ACTIVITY 3.15.2:

In C please. NOT in C++ or Java

CHALLENGE ACTIVITY 3.15.2: Conditional expression: Print negative or positive. 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 test passed passed 1 #include 2 #include 3 4 int main(void) { 5 char condStr[50]; 6 int userval; 7 8 scanf("%d", &userval); a 9 10 strcpy(condStr, /* Your solution goes here 11 11 12 printf("%d is %s. ", userval, condStr); 13 14 return 0; 15} */); Run View your last submission V

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!