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
What are smart pointers?
What is a c++ class?
What are c++ storage classes?
What is object in c++ wikipedia?
What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero
Can java be faster than c++?
When should overload new operator on a global basis or a class basis?
Is it possible to get the source code back from binary file?
What is the best free c++ compiler for windows?
Where do I find the current c or c++ standard documents?
What is pointer to member?
Is c++ used anymore?
What is the difference between structure and class?
Is empty stack c++?
What is the difference between passing by reference and passing a reference?