Saved Bookmarks
| 1. |
Write a syntax for ternary expression. |
|
Answer» a = 10, b = 20, c; if (a < b) { c = a; } ELSE { c = b; } printf("%d", c); This example takes more than 10 LINES, but that isn't NECESSARY. You can write the above PROGRAM in just 3 lines of cođe using a ternary operator. |
|