Objective-C language is an object-oriented programming language that can be used to send instant messages to the C language. Apple, iOS, OS X, and their particular APIs are used by this main programming language.
Let's view the syntax of this method:
Void NSlog( NSString *format, ...)
In NSLog(@ " " )
, NSlog
is a foundation and @
is literal in C and it is compulsory to write; otherwise, there will be a compile-time error.
Let's look at the code example below:
#import <Foundation/Foundation.h>int main() {NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];NSLog(@"HI... what's up!");NSLog(@"Log handling");return 0;[pool drain];}
We import Foundation
, which is a basic layer for working on applications in different perspectives like texting, editing, calculations, and many more.
@
, and print ( Hi…what’s up
) with the help of NSlog
.@
, and print ( Log handling
) with the help of NSlog
.