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
Why & is used in scanf in c?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What is switch in c?
Are pointers integers in c?
What is pointer to pointer in c with example?
Can we increase size of array in c?
Explain what is a static function?
Explain how do you print an address?
What is selection sort in c?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
What is the meaning of && in c?
What are the types of assignment statements?
What is a static variable in c?
What are compound statements?