And also, why is it not necessary for, eg:
printf ("abc")
NSLog
takes an NSString
as argument. @"abc"
denotes an NSString
because of the @ sign, so that is a valid argument for NSLog
. printf
is a normal C function that takes a C string, which is simply created using "".
UPDATE:
NSLog(@"%@",dictionary)
Tells the compiler that i got string to fulfill the requirement of string argument.
Update: Sorry I was supposed to write the "NSLog" instead of printf. my mistake!
Because it requires NSString. Adding @declares value as type of NSObject (simplification).