База ответов ИНТУИТ

Программирование на Objective-C

<<- Назад к вопросам

Что делает данный код?
NSMutableString * content = [ NSMutableString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:nil ];       [ content appendFormat:littleString ];

(Ответ считается верным, если отмечены все правильные варианты ответов.)

Варианты ответа
дописывает в конец файла path строку littleString
дописывает в конец строки content строку littleString(Верный ответ)
инициализирует строку файлом по URL path(Верный ответ)
Похожие вопросы
Что делает данный код?
NSMutableString * content = [ NSMutableString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:nil ];        NSLog(@"The text is %@", content);[ content appendFormat:littleString ];        [ content writeToURL:path2 atomically:YES ];
Что делает данный код?
NSMutableString * content = [ NSMutableString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:nil ];       NSLog(@"The text is %@", content);        [ content writeToURL:path2 atomically:YES ];
Что делает данный код?
if ( [ fm fileExistsAtPath:startPath ]) {  NSDictionary * fAtt = [ fm attributesOfItemAtPath:startPath error:nil ];    [ fm moveItemAtPath:startPath toPath:finalPath error:nil ];}
Что делает данный код?
if ( [ fm fileExistsAtPath:startPath ]) {  NSDictionary * fAtt = [ fm attributesOfItemAtPath:startPath error:nil ];  for (NSString *key in fAtt) {    NSLog(@"Attribute %@ is %@", key, [ fAtt objectForKey:key]);    }      [ fm moveItemAtPath:startPath toPath:finalPath error:nil ];}
Что делает данный код?
if ( [ fm fileExistsAtPath:startPath ]) {  NSDictionary * fAtt = [ fm attributesOfItemAtPath:startPath error:nil ];  for (NSString *key in fAtt) {    NSLog(@"Attribute %@ is %@", key, [ fAtt objectForKey:key]);    }}
Объект класса one вызывает метод description. Метод какого класса будет вызван, если one наследует от two, в котором тоже определен метод description.
Объект класса firstClass вызывает метод description. Метод какого класса будет вызван, если firstClass наследует от secondClass, в котором тоже определен метод description.
Расставьте типы возвращаемых значений getter'а и setter'а перемнной типа int.
-( ? ) count;-( ? ) setCount:(int) c;
Объекты каких классов создает код blueCircle * myCircle = [[blueCircle alloc ] init]; при том, что он наследует от классов circle и shape?
Объекты каких классов создает код redSquare * mySquare = [[redSquare alloc ] init]; при том, что он наследует от классов square и shape?