write function to reverse char array ... without using second
array
Answer Posted / nagesh r. dalave
void main()
{
char strp20];
int len=0,i=0;
printf("\nEnter a string ");
gets(str);
while(str[i]!='\0')
{
i++;
len++;
}
printf("\nReverse of given string:");
while(i>=0)
{
printf("\n %c",str[i]);
i--;
}
getch();
}
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
What is the modulus operator?
What is the difference between c &c++?
What is double pointer in c?
Describe newline escape sequence with a sample program?
Lists the benefits of c programming language?
How do you print an address?
When can you use a pointer with a function?
Why is c so important?
What is a program flowchart and explain how does it help in writing a program?
Differentiate between the expression “++a” and “a++”?
How important is structure in life?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
The __________ attribute is used to announce variables based on definitions of columns in a table?
Was 2000 a leap year?