How do You Assign a Value to a Variable in Objective C?
#import <Foundation/Foundation.h>
int main (int argc, const char *argv[])
{
@autoreleasepool {
int value1, value2, sum;
value1 = 50;
value2 = 25;
sum = value1 + value2;
NSLog (@"The sum of %i and %i is %i", value1, value2, sum);
}
return 0;
}
Output:
The sum of 50 and 25 is 75