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 is #include iomanip?

962


What is difference between c++ and c ++ 14?

1005


Is python written in c or c++?

1118


What is a c++ class?

1052


Does improper inheritance have a potential to wreck a project?

1099


When do we run a shell in the unix system? How will you tell which shell you are running?

925


What is the use of volatile variable?

1041


Is java a c++?

1001


Explain the static storage classes in c++.

1214


Explain what you mean by a pointer.

1069


Define a pdb file.

1035


What is the difference between reference and pointer?

1108


What is the arrow operator in c++?

965


What is a storage class?

1204


what is data abstraction in C++?

1041