Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Func Var and Ops ObjC
//gcc 5.0.4 #import <Foundation/Foundation.h> @interface SampleClass:NSObject - (void)add; - (void)sub; - (void)mul; - (void)div; @end @implementation SampleClass int a=10, b=20; - (void)add { NSLog(@"Addition of %d and %d is %d \n",a,b,a+b); } - (void)sub { NSLog(@"Subtraction of %d and %d is %d \n",a,b,a-b); } - (void)mul { NSLog(@"Multiplication of %d and %d is %d \n",a,b,a*b); } - (void)div { NSLog(@"Division of %d and %d is %d \n",b,a,b/a); } @end int main() { SampleClass *sampleClass = [[SampleClass alloc]init]; [sampleClass add]; [sampleClass sub]; [sampleClass mul]; [sampleClass div]; return 0; }
run
|
edit
|
history
|
help
0
acquire-lock
size of datatypes in objective c
string search
NSString Examples in one
if con boleanos 01
muteble
02 Mostrar valor de variable entera
datatype
fullname
bookinheritence