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
Is it possible for the objects to read and write themselves?
Why is it called c++?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What is the average salary of a c++ programmer?
What is object in c++ example?
Why was c++ made?
What is protected inheritance?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What are multiple inheritances (virtual inheritance)?
Can member data be public?
What language does google use?
How is new() different from malloc()?
Describe private, protected and public?
What is static function? Explain with an example
Which operator cannot be overloaded c++?