O'Reilly logo

Absolute Beginner’s Guide to C, 2nd Edition by Greg Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11. Can I Compare Two Values?

With Relational Operators

image

C provides an extremely useful statement called if. if lets your programs make decisions and execute certain statements based on the results of those decisions. By testing contents of variables, your programs can produce different output given different input.

Relational operators are also described in this chapter. Relational operators, combined with if, make C a powerful data-processing language. Computers would really be boring if they couldn’t test data. Computers would be little more than calculators if they ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required