Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between NSLog and Printf statement for ObjectiveC

Tags:

People also ask

What is the difference between NSLog and printf?

NSLog is like a printf, but it does a bit more: A timestamp is added to the output. The output is sent to the Xcode console, or whatever stderr is defined as. It accepts all the printf specifiers, but it also accepts the @ operator for objects which displays the string provided by the object's description method.

What is a printf in C?

"printf" is the name of one of the main C output functions, and stands for "print formatted". printf format strings are complementary to scanf format strings, which provide formatted input (lexing aka. parsing).

What is Nsstring?

A static, plain-text Unicode string object which you use when you need reference semantics or other Foundation-specific behavior.


I want to know about the difference between the NSLog and the Printf statement in Objective-C (for application purpose...!)

Why do all developer use NSLog instead of Printf ?

Both look similar, but what is the difference in internal working?

At which point can they be differentiated ?