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
I need a sort of an approximate strcmp routine?
How will you divide two numbers in a MACRO?
What is a string?
Why do we use static in c?
What is the difference between volatile and const volatile?
Do array subscripts always start with zero?
What is malloc and calloc?
Write a program on swapping (100, 50)
When should a far pointer be used?
What happens if a header file is included twice?
What is the argument of a function in c?
Why structure is used in c?
What are dangling pointers in c?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Explain b+ tree?