CodeX
Published in

CodeX

CODEX

C — 5 Tips And ‘Tricks’

Write professional C code and impress your friends

Photo by Artem Sapegin on Unsplash

1. One Liner If-Else Statements

You can easily convert if-else statements to one-liners using a ternary operator, also known as a conditional operator.

For example, you can easily replace this:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Artturi Jalli

Artturi Jalli

I built a blog from 0 to 350k+ monthly visits in 16 months without SEO.