Amazon.com Widgets Program 13.2
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 24, 2014, 05:41:11 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Program Examples
| | |-+ Chapter 13
| | | |-+ Program 13.2
Pages: [1] Go Down
Print
Author Topic: Program 13.2 (Read 1248 times)
esc
Global Moderator
Full Member
*****
Posts: 230






on: March 01, 2009, 03:15:47 PM

Program 13.2  (Character Array)
Code: (Objective-C)
#import <Foundation/Foundation.h>

int main (int argc, char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
char word[] = { 'H', 'e', 'l', 'l', 'o', '!' };
int i;

for ( i = 0; i < 6; ++i )
NSLog (@"%c", word[i]);

    [pool drain];
    return 0;
}
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.