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

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

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

Что делает данный код?
NSMutableString * content = [ NSMutableString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:nil ];        NSLog(@"The text is %@", content);[ content appendFormat:littleString ];        [ content writeToURL:path2 atomically:YES ];

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

Варианты ответа
инициализирует строку content файлом по URL path2
записывает строку content в фаил по URL path2(Верный ответ)
вписывает в строку content строку littleString(Верный ответ)
Похожие вопросы
Что делает данный код?
NSMutableString * content = [ NSMutableString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:nil ];       NSLog(@"The text is %@", content);        [ content writeToURL:path2 atomically:YES ];
Что делает данный код?
NSMutableString * content = [ NSMutableString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:nil ];       [ content appendFormat:littleString ];
Что делает данный код?
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]);    }}
Что делает данный код?
if ( [ fm fileExistsAtPath:startPath ]) {  NSDictionary * fAtt = [ fm attributesOfItemAtPath:startPath error:nil ];    [ fm moveItemAtPath:startPath toPath:finalPath error:nil ];}
Какое число мы увидим при выполнении?
int array[4] = {4,0,-1,3};NSLog(@"%i", array[1]);
Какое число мы увидим при выполнении?
int array[5] = {9,8,0,6,5};NSLog(@"%i", array[4]);
Какое число мы увидим при выполнении?
int array[5] = {9,8,0,6,5};NSLog(@"%i", array[3]);
Что выведется на экран?
NSMutableDictionary *dict = [ NSMutableDictionary dictionaryWithObjectsAndKeys:@"a", @"b",@"c", @"d",nil];NSLog(@"%@", [ dict objectForKey:@"b" ]);
Что выведется на экран?
NSMutableDictionary *dict = [ NSMutableDictionary dictionaryWithObjectsAndKeys:@"a", @"b",@"c", @"d",nil];NSLog(@"%@", [ dict objectForKey:@"b" ]);