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

  • Home
  • SEARCH
  • 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 6752059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:00:01+00:00 2026-05-26T13:00:01+00:00

I have successfully completed an AQA Computing exam (June 2011) in Delphi. Out of

  • 0

I have successfully completed an AQA Computing exam (June 2011) in Delphi. Out of curiosity, I read the mark scheme for it. One thing I can’t get over is that the C language mark scheme seems to be wrong on many aspects. Luckily (ha!) I did it in Delphi.

For example, this small snippet:

char* Names[5];
...
void main(void)
{
    Names[1] = "Ben";
    Names[2] = "Thor";
    Names[3] = "Zoe";
    Names[4] = "Kate";
    ...
}

For one, it’s not possible to assign strings to an array. A function like strcpy must be used. Also, why do the arrays start at 1, even though 5 entries have been allocated? Most programming languages, including C, start at 0.

There are other problems, for example they use printf("%s", "message"); to print strings; puts would be fine. And if you can be certain no unescaped percent signs would show up in the message, so would printf alone, with no arguments.

Am I right in my criticism of this?

Note: For those unfamiliar with mark schemes, they are what is used to mark the exams. I am questioning whether it is correct.

  • 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-26T13:00:02+00:00Added an answer on May 26, 2026 at 1:00 pm

    Starting the index at 1 is weird, and main doesn’t return void in C, but the array assignment is valid. Names is an array of pointers, and “Ben” looks like a string pointer. You would need to to use strcpy only if you wanted to copy the strings into space allocated for them. That program will still compile if the compiler isn’t too picky and it doesn’t have runtime issues unless someone refers to Names[5].

    The printf thing is actually better. puts is bad juju and, as you pointed out, you can’t be certain that no unescaped %s appear in the string.

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

Sidebar

Related Questions

I have successfully managed to get System.Speech.Synthesis to read English text in arbitrary voices
I have just installed South (0.7.3, python-2.6) and successfully completed the tutorial using the
I have successfully completed this: http://www.sitepoint.com/loading-twitter-data-into-android-with-lists/ tutorial and have gotten my app to display
I have successfully completed a multiple imputation on the missing data of my questionnaire
We have just completed implementing a successful but problematic project. We want to get
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I have successfully implemented interop beftween Win32 application and managed .Net dll as described
I have successfully upgraded an MFC application which was compiled with an old version
I have successfully used the Excel and Word addin templates in Visual studio 2008
I have successfully set up FILESTREAM on my SQL 2008 server; however I've noticed

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.