if statement

Posted on 2006-05-09
Medium Priority
Last Modified: 2010-03-31
what does this mean again: a ? b: c
Question by:komlaaa
  • 3
LVL 30

Accepted Solution

Mayank S earned 100 total points
ID: 16638966
If a is true then return b else return c
LVL 30

Expert Comment

by:Mayank S
ID: 16638976
For example, if you have:

int i = x > y ? 5 : 4 ;

If x is greater than y, then 5 will be assigned to 'i', else 4 will be assigned.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question