Switch in Objective-C
Switch statements express conditionals across many branches.
Here’s a basic switch
.
To run the program, save the code in a file named main.m
and then compile and execute it using clang
and ./
.
Output:
Now that we can run and build basic Objective-C programs, let’s learn more about the language.