Write a function that accepts a sentence as a parameter, and
returns the same with each of its words reversed. The
returned sentence should have 1 blank space between each
pair of words.
Demonstrate the usage of this function from a main program.
Example:
Parameter: “jack and jill went up a hill” Return Value:
“kcaj dna llij tnew pu a llih”
Answer Posted / gunapala
start=0;
for(i=0;str[i]!='\n';i++)
{
if(str[i]!=' ')
{
for(j=i;j>=start;j--)
{
b[k++]=str[j];
}
start=start+1;
}
printf("/s",b);
}
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Write a program to print all permutations of a given string.
#include
Difference between macros and inline functions? Can a function be forced as inline?
Tell me when is a void pointer used?
What is the difference between test design and test case design?
How to delete a node from linked list w/o using collectons?
Explain the concept and use of type void.
Explain how does free() know explain how much memory to release?
difference between Low, Middle, High Level languages in c ?
What is a pragma?
What is header file definition?
What are all different types of pointers in c?
Explain what is a program flowchart and explain how does it help in writing a program?
How do you construct an increment statement or decrement statement in C?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm