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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:34:12+00:00 2026-05-30T14:34:12+00:00

When we are passing a string to the strrev function, which is provided by

  • 0

When we are passing a string to the strrev function, which is provided by Microsoft, and has the function prototype in string.h. It reverses the string we are passing to it and returns the same address back.

First thing – should it modify the original char array?
Second thing – When it is modifying the same pointer we are passing to it,why should it send it back?!

  • 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-30T14:34:14+00:00Added an answer on May 30, 2026 at 2:34 pm

    First, yes, it should modify the original array. That’s its sole purpose.

    Second, yes, it should return the pointer to the array. There’s nothing else useful for it to return, and sometimes getting the pointer back makes the code more compact, saving the need for a temporary if the parameter passed to strrev isn’t already stored in a variable.

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

Sidebar

Related Questions

I am having in issue with IE passing a string back into an swf
I'm just wondering why passing a System.Collections.Generic.List<string> into this function test(ICollection<object> t) will not
Basically, I'm passing a pointer to a character string into my constructor, which in
I am having a function: int getparam(char *gotstring) and i am passing a string
Friends On HP-UX box when Iam passing a string object to function Im getting
Can I get a google model attribute by passing a string to some function?
While using the org.apache.commons.lang.math.NumberUtils.isNumber(String str) function, I see that passing a string like 1f
Currently I have an Atoi function in Java which returns an int value on
I have a situation where I am passing a string to a function. I
My plugin calls JavaScript function using NPN_Invoke, passing a string argument to it. Everything

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.