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 #include iomanip?
What is difference between c++ and c ++ 14?
Is python written in c or c++?
What is a c++ class?
Does improper inheritance have a potential to wreck a project?
When do we run a shell in the unix system? How will you tell which shell you are running?
What is the use of volatile variable?
Is java a c++?
Explain the static storage classes in c++.
Explain what you mean by a pointer.
Define a pdb file.
What is the difference between reference and pointer?
What is the arrow operator in c++?
What is a storage class?
what is data abstraction in C++?