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 the need of a destructor?
What is virtual destructor? What is its use?
Define stacks. Provide an example where they are useful.
When should I use unitbuf flag?
Describe friend function & its advantages.
What is c++ hash?
What is java and c++?
Eplain extern keyword?
Explain what happens when a pointer is deleted twice?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is std :: endl?
What is the difference between a declaration and a definition?
Write a program to find the reverse Fibonacci series starting from N.
Write a Program to find the largest of 4 no using macros.
Evaulate: 22%5 a) 2 b) 4 c) 0