×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

array to array

array to array

array to array

(OP)
Hi,
I have to learn arrays and I am having trouble to
pass the "name" array into the "max_age_name" array.

Your help is very much appreciated
Andonny

if(maxage<age)
{
maxage=age;
while(name!='\0')
{
max_age_name=name;
printf("%c", max_age_name[i++]);
i++;
}
}

RE: array to array

if name is a string(char * or an array of character) then you can use strcpy() function.

other way is to copy character by character. In your code array subscript is missing.
It should be :
        max_age_name=name;
Regards,
Nkhiste.

RE: array to array

hi, i have to find a sequence of characters in a 2D array. and having trouble of how to make the result of the char i want to display on screen.
table_1[6] {'\o', 'K', 'E', 'N', 'Z', '\o'}
table_2[6] {'\o', 'D', 'O', 'B', 'R', '\o'}
what should i do to make 'K', 'E', 'N' to display on screen?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources