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
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
What is the sizeof () operator?
How can I implement a delay, or time a users response, with sub-second resolution?
Stimulate calculator using Switch-case-default statement for two numbers
Explain why c is faster than c++?
Why we not create function inside function.
How is a structure member accessed?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
how to find anagram without using string functions using only loops in c programming
What is c++ used for today?
Write a Program to accept different goods with the number, price and date of purchase and display them
What is the difference between int main and void main in c?
What is the purpose of clrscr () printf () and getch ()?
write a program for the normal snake games find in most of the mobiles.