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 3439670
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:20:18+00:00 2026-05-18T08:20:18+00:00

Hi all C experts (please don’t shoot, I’m no C programmer anymore but from

  • 0

Hi all C experts (please don’t shoot, I’m no C programmer anymore but from time to time I have a question that pops in my mind)

I was reading another question (How to print an entered string backwards in C using only a for loop).

The “simplest” and most logical answer is

for (x = end; x >= 0; --x) {
    printf("%c", word[x]);
}

But I was wondering if there wasn’t a way to achieve the same goal but staying closer to the original loop poseted:

for (x = word[end]; x >= word[0]; x--) {
    printf("%c", x);
}

I don’t know enough C to work it out, but couldn’t we play with the arrays pointers to loop through

char * wordp;
for(wordp = &word[end]; /*something*/; wordp--){\
   printf("%c", &wordp);
}

P.S.: I don’t really care if it is a forwards or backwards loop.

P.P.S.: Sorry if I made obvious C mistakes in the pointers; point them out in the comment and I’ll edit them. 😉

Jason

  • 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-18T08:20:18+00:00Added an answer on May 18, 2026 at 8:20 am

    Absolutely.

    char *wordp;
    
    for(wordp = word + end; wordp >= word; wordp--){
       printf("%c", *wordp);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I currently have two projects that are under SourceSafe that I am unable
Could all those CORBA experts out there please help me with this one. I
This is for the swing experts out there. I have spent considerable time on
If all tables I want to delete from have the column gamer_id can i
Several security experts have said in the past that the login page should be
* Summarization: Please check the knowledgeable comments from the Delphi experts. Specifically for me,
I have posted a question on here previously asking similar advise, but this project
All I know about the constraint is it's name ( SYS_C003415 ), but I
All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of
First of all this is homework. I have been trying to get rid of

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.