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
why is iostream::eof inside a loop condition considered wrong?
What is the main use of c++?
How much is c++ certification?
What is doubly linked list in c++?
What are the benefits of c++?
What is prototype in c++ with example?
What is std namespace in c++?
What is difference between array and vector in c++?
What is the difference between a baller and a reference in C++?
Do class method definitions?
Describe private, protected and public – the differences and give examples.
What is the full form of c++?
daily Routine of father
Is c++ map a hash table?
Is C++ case sensitive a) False b) Depends on implementation c) True