NAME

Question types


Start with


Question limit

of 13 available terms

Print test

13 True/False questions

  1. In an NSLog statement, the token for an unsigned long is....%f

          

  2. In an NSLog statement, the token for an int is...%d

          

  3. Create a string called 'puppet' that has the value 'Pinocchio' without using message syntax (use the shorthand technique).NSString *puppet = @"Pinocchio";

          

  4. Create a string called 'puppet' that has the value 'Pinocchio' using message syntaxNSString *puppet = [[NSString alloc] initWithString:@"Pinocchio"];

          

  5. Correct the error: NSString temp = [[NSString alloc] init];%f

          

  6. Given: NSString fname = @"John"; NSString lname = @"Doe"; Write a command(s) that creates a new NSString called 'fullName' that concatenates fName and lName.NSString *fullName = [fname stringByAppendingString: @" "]; fullName = [fullName stringByAppendingString: lname];

          

  7. Given: NSString *puppet = @"Pinocchio"; Write a line of code that stores the number of letters in 'puppet' in a variable called 'len'. Use message notation.format string...token...format specification

          

  8. In an NSLog statement, the token for a string is...%d

          

  9. In an NSLog statement, the token for a float is....%c

          

  10. Given: bool status = [TCAStringManip isUpperCaseLetter:t]; Write a statement that logs 'YES' if status is true and 'NO' if status is false using the ternary operatorunsigned long len = [puppet length]; (using 'int' for the data type here creates a warning)

          

  11. Given: NSString *school = @"TCA"; NSLog(@"I attend %@", school); The fragment '@"I attend %@"' is called a _____ ____ and the fragment '%@' is called a _____ or _____ _______NSString *fullName = [fname stringByAppendingString: @" "]; fullName = [fullName stringByAppendingString: lname];

          

  12. In an NSLog statement, the token for a char is....%c

          

  13. Given: unsigned long len = [@"Hello World" length]; What is an acceptable replacement datatype for 'unsigned long'unsigned long len = [puppet length]; (using 'int' for the data type here creates a warning)