3 Replies - 3253 Views - Last Post: 22 November 2010 - 07:59 PM Rate Topic: -----

#1 n00599105  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-November 10

array of strings and selection sort

Posted 22 November 2010 - 07:32 PM

. Write the definition for a C function that will accept an array of strings and selection sort them using ascending ASCII order.

-im extremely lost in my computer science class and one of the homework questions is ^. Can anyone please help me, thankyou.
Is This A Good Question/Topic? 0
  • +

Replies To: array of strings and selection sort

#2 n00599105  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-November 10

Re: array of strings and selection sort

Posted 22 November 2010 - 07:48 PM

Hey everybody! I just joined the site, and I could really use some help. I see that like 30 people have veiwed my post, but know ones helping out! I just started my first computer science class ever and I'm having a lot of problems. My professor might as well be speaking another language, that's how much I really don't understand this stuff. We've written a couple basic programs in main like "Create a program that prompts the user for two integers and calculates the area and perimeter". I was able to do all that, but now we're getting into arrays and strings and all this stuff and I'm so confused. She posts a lot of practice questions to prepare us for tests and this is one of them:

Write the definition for a C function that will accept an array of strings and selection sort them using ascending ASCII order.

Not only do I have know idea how to go about this, I dont even understand what she means by "write the definition". Shes never asked us a question before like this. If you can help me I'd really appreciate it.

Thankyou
Was This Post Helpful? 0
  • +
  • -

#3 n00599105  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-November 10

Re: array of strings and selection sort

Posted 22 November 2010 - 07:57 PM

Can someone at least maybe tell me what she means by "write the definition". I'm sure everyone on this site is way more advanced, but you should help the little guys out pretty please!
Was This Post Helpful? 0
  • +
  • -

#4 alias120  Icon User is offline

  • The Sum over All Paths
  • member icon

Reputation: 123
  • View blog
  • Posts: 702
  • Joined: 02-March 09

Re: array of strings and selection sort

Posted 22 November 2010 - 07:59 PM

Hello and welcome to DreamInCode! First, I will answer a question you seem to have. The question is asking for a definition of a function. I'll briefly explain the difference between a definition and a declaration when it comes to functions. A declaration might be as follows,

int testFunction(int x, int y);



This is the syntax for declaring a function named "testFunction" that accepts two ints as its arguments and returns an int. Notice that the details of how this function is implemented are not shown here.

A function definition includes the declaration, along with the implementation details. Below is the same function as above, but defined.

int testFunction(int x, int y)
{
    int sum = x + y;
    return sum;
}



So, your teacher is asking for you to write the definition of a function that meets the requirements stated above. So, I should ask if you understand how functions work, and how arrays work? Depending on your experience with these two areas will let us know how much explanation is needed.

This post has been edited by alias120: 22 November 2010 - 08:09 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1