Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

simple c++ program for "abcde123ba" convert "ab321edcba"
with out using string

Answer Posted / prasenjit roy

#include "stdio.h"

int main(int argc, char* argv[])
{
char sBuffer[]="abcde123ba";
char sBuff[100];
char *pStr = sBuffer;
int i;
puts(sBuffer);

while(*pStr != '\0')
++pStr;
for ( i = 0; pStr != sBuffer; i++,pStr--)
sBuff[i] = pStr[-1];
sBuff[i] = '\0';

puts(sBuff);
return 0;
}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are smart pointers?

2388


What is a c++ class?

1151


What are c++ storage classes?

1157


What is object in c++ wikipedia?

1062


What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

1152


Can java be faster than c++?

1203


When should overload new operator on a global basis or a class basis?

1133


Is it possible to get the source code back from binary file?

1429


What is the best free c++ compiler for windows?

1150


Where do I find the current c or c++ standard documents?

1134


What is pointer to member?

1171


Is c++ used anymore?

1135


What is the difference between structure and class?

1371


Is empty stack c++?

1057


What is the difference between passing by reference and passing a reference?

1134