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
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
What is an auto keyword in c?
Is there any demerits of using pointer?
Explain what are global variables and explain how do you declare them?
When a c file is executed there are many files that are automatically opened what are they files?
What is structure data type in c?
What is the most efficient way to count the number of bits which are set in an integer?
What are type modifiers in c?
What is the purpose of clrscr () printf () and getch ()?
List the difference between a "copy constructor" and a "assignment operator"?
How many header files are in c?
What is New modifiers?
How can you convert integers to binary or hexadecimal?
Why is main function so important?