Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 975425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:35:00+00:00 2026-05-16T03:35:00+00:00

I am writing some code to allow users to answer multiple choice questions. So

  • 0

I am writing some code to allow users to answer multiple choice questions. So I have an NSArray of values [@”value1″, @”value2″, ..]

I want to display them as:
A) value1
B) value2

The code I have is

for(int i = i; i < [values count]; i = i+1) {
NSString *displayValue = [[NSString alloc] initWithString:<NEED HELP HERE>];
displayValue = [displayValue stringByAppendingString:@") "];
displayValue = [displayValue stringByAppendingString:[values objectAtIndex:i];
}

The question I have is if there is where I have put , how could I convert i to the right ASCII character (A, B, C, etc) and initialize the string with that value

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:35:00+00:00Added an answer on May 16, 2026 at 3:35 am
    NSString *displayValue = [NSString stringWithFormat:@"%c",'A'-1+i];
    

    and to get the whole string at once, use:

    NSString *displayValue = [NSString stringWithFormat:@"%c) %@",'A'-1+i,
                                                       [values objectAtIndex:i]];
    

    (ps. if you alloc an object, you must also release or autorelease, or you will “leak” memory)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a module that has multiple questions users can chose to answer. Each
I'm writing some code to permit users to remotely manage IIS7. Under the bonnet
I'm writing some code to allow user to book a table in a restaurant.
I am re-writing some code for a new re-design and I am wondering if
I'm writing some code that will take a screenshot of another application, given its'
I'm writing some code for a very limited system where the mod operator is
I am writing some code in C: int main(){ char guess[15]; guess = helloValidation(*guess);
I am writing some code that will go through a file, edit it as
I am writing some code where I count the number of Div children and
I'm writing some code (just for fun so far) in Python that will store

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.