write an algorithm to get a sentence and reverse it in the
following format:
input : I am here
opuput: Here Am I
note: first letter of every word is capiatlised
Answer Posted / debasis patnaik
ALGO:1.TAKE A STRING STR1
2.REVERSE IT BY STRREV(STR1)
3.CONCANICATE WITH SPACEBY STRCAT(" ",STR1)AND ASSIGN TO STR2
4.IF(STR2[I]==" ")
{
(ISUPPER(STR2[I+1])))
PRINT(STR(2)
5.END
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Difference between constant pointer and pointer to a constant.
What is the difference between formatted&unformatted i/o functions?
hi, which software companys will take,if d candidate's % is jst 55%?
Why malloc is faster than calloc?
What do you mean by keywords in c?
What is the difference between if else and switchstatement
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
What is the use of static variable in c?
What is 2c dna?
Describe newline escape sequence with a sample program?
Which one would you prefer - a macro or a function?
#include
The difference between printf and fprintf is ?
Why is c platform dependent?
What is the difference between mpi and openmp?