This is the C ternary operator (Objective-C is a superset of C):

label.frame = (inPseudoEditMode) ? kLabelIndentedRect : kLabelRect;

is semantically equivalent to

if(inPseudoEditMode) {
 label.frame = kLabelIndentedRect;
} else {
 label.frame = kLabelRect;
}

The ternary with no first element (e.g. variable ?: anotherVariable) means the same as (valOrVar != 0) ? valOrVar : anotherValOrVar

Answer from Barry Wark on Stack Overflow
🌐
Quora
quora.com › What-does-the-question-mark-mean-in-C
What does the question mark mean in C? - Quora
Example: (x > y) ? x : y It can be also written as: if(x > y) { printf(“%d”,x); } else { printf(“%d”,y); } Both example are the same but the ternary operator is used for simplicity and also reduces the line of codes.
🌐
Crasseux
crasseux.com › books › ctutorial › The-question-mark-operator.html
The question mark operator - The GNU C Programming Tutorial
Because it is a little cryptic, it is not often used, but the basic form is as follows: ... The program evaluates condition. If it is true (not zero), then expression1 is returned; otherwise, expression2 is returned. For example, in the short program below, the line bas = (foo > bar) ? foo ...
🌐
Mathbits
mathbits.com › MathBits › CompSci › looping › operator2.htm
Conditional Operator for C++
Conditional Operator · You can exchange simple if-else code for a single operator the conditional operator. The conditional operator is the only C++ ternary operator (working on three values). Other operators you have seen are called binary operators (working on two values)
🌐
University of Washington
courses.washington.edu › css342 › zander › css332 › datatypes.html
C/C++ data types, basic operators, and control structures
If you do this, then you can traverse ... array, cout << s << endl; &nbsp displays the string. Note that when initializing on the declaration, the '\0' char will automatically be stored. So the following char array will have six elements: char s[] = "hello"; Basic operators The basic operators are the same as in Java, e.g., +, -, *, /, %, ++, --, etc. The question mark operator, ?:, is also found in C++. Some people call it the ternary operator because it is the only operator in C++ (and Java) that takes three operands...
🌐
Cprogramming
cboard.cprogramming.com › cplusplus-programming › 107629-usage-question-mark.html
Usage of a Question Mark
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter ... It's called the ternary operator. It's not quite the same thing in this case as bit is more than likely a bool type, while "1" and "0" are strings (character if had been '1').
🌐
YouTube
youtube.com › watch
Conditional Statements: if-Else if-Else, Switch, Question Mark (Ternary) Operator - YouTube
Different methods of decision-making and conditional statements in C++ are shown in this video, including if-Else if-Else, Question Mark (Ternary) Operator, ...
Published   March 9, 2023
Find elsewhere
🌐
YouTube
youtube.com › watch
C Programming Tutorial 66 - Ternary (Conditional) Operator - YouTube
Start your software dev career - https://calcur.tech/dev-fundamentals 💯 FREE Courses (100+ hours) - https://calcur.tech/all-in-ones🐍 Python Course - https:...
Published   August 8, 2019
🌐
YouTube
youtube.com › neso academy
Conditional Operator in C - YouTube
C Programming & Data Structures: Conditional Operator in C Topics discussed: 1. Introduction to Conditional Operator in C language. 2. Use of Conditional Ope...
Published   April 8, 2018
Views   58K
🌐
PCMAG
pcmag.com › home › encyclopedia › q
Definition of question mark | PCMag
In C programming, the question mark is used as a conditional symbol. For example, in the expression x1 ? x2 : x3, if x1 is not zero, then x2 is evaluated, otherwise x3 is evaluated.
🌐
O'Reilly
oreilly.com › library › view › programming-in-objective-c › 9780133756937 › ch06lev1sec4.html
The Conditional Operator - Programming in Objective-C, Sixth Edition [Book]
December 3, 2013 - Unlike all other operators in Objective-C—which are either unary or binary operators—the conditional operator is a ternary operator; that is, it takes three operands. The two symbols used to denote this operator are the question mark (?) ...
Author   Stephen G. Kochan
Published   2013
Pages   576
🌐
Unstop
unstop.com › home › blog › ternary (conditional) operator in c (+code examples)
Ternary (Conditional) Operator In C (+Code Examples)
December 26, 2023 - Condition: The first part of the ternary operator is the condition, which is a ternary expression that evaluates to either true or false. It is followed by a question mark ?. Expression if True: The second part is the expression that is evaluated if the intial condition statement evaluated to be true comparison.
🌐
Reddit
reddit.com › r/cpp_questions › boolean condition for question mark operator.
r/cpp_questions on Reddit: Boolean condition for question mark operator.
March 6, 2022 -

Hi I'm using codeblocks with the gcc++ compiler, and I want to use a global variable Boolean as the condition for a question mark operator, here is the code I'm having a n issue with.

bool moving = false;

moving ? switch(direction){
          case 1:
          break;
          case 2:
          break;
          case 3:
          break;
          case 4:
          break;
 }
       : ;

but the compiler doesn't seem to recognize "moving" as a condition, because whenever I try to compile it, it tells me "error - expected primary condition before switch"

🌐
Arduino Forum
forum.arduino.cc › projects › programming
Ternary operators made easy - Programming - Arduino Forum
July 21, 2025 - One of the great features of the C language is the ternary operator. It’s a wonderful tool (can be used as both an lvalue and rvalue; the only way to conditionally initialize a constant), but reading deeply nested tern…
🌐
W3Schools
w3schools.com › c › c_conditions.php
C If ... Else Conditions
Since the condition in an if statement must be either true or false, you can store the result in a boolean variable instead of writing the comparison directly: int x = 20; int y = 18; bool isGreater = x > y; if (isGreater) { printf("x is greater than y"); } Try it Yourself » · This can make your code easier to read, especially when the condition is complex or used more than once. Note: Remember to include <stdbool.h> when working with bool variables.