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 is c++ prototype?
Why is polymorphism useful?
What is the history of c++?
What is a forward referencing and when should it be used?
Why is c++ still best?
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0
Do you know about latest advancements in C++ ?
What is the main function c++?
What is friend class in c++ with example?
What is the difference between a template and a macro?
How would you obtain segment and offset addresses from a far address of a memory location?
Define a constructor?
What are the differences between the function prototype and the function defi-nition?
What is code reusability in c++?
Tell me what are static member functions?