simple c++ program for "abcde123ba" convert "ab321edcba"
with out using string
Answer Posted / pramod
void mystrrev(char* str)
{
char ch;
int last=strlen(str)-1;
for(int i=0;i<last;i++,last--)
{
ch=str[i];
str[i]=str[last];
str[last]=ch;
}
}
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is input operator in c++?
What are the types of array in c++?
In a function declaration, what does extern mean?
What is a template in c++?
What is a float in c++?
What is c++ flowchart?
What is virtual table?
What is virtual base class?
Why do we use iterators?
why and when we can declar member fuction as a private in the class?
How do you declare a set in c++?
Difference between class and structure.
Can you use the function fprintf() to display the output on the screen?
What is one dimensional array in c++?
Explain method of creating object in C++ ?