skip to main
|
skip to sidebar
Let Us C Solutions
Friday, October 30, 2009
Chp9[D]f Removing two or more spaces in a string
Write a program that replaces two or more consecutive blanks in a string by a single blank. For example, if the input is
void main()
{
char sent[]="Grim return to the planet of apes!!";
int i;
for(i=0;sent[i]!=0;i++)
{
if(sent[i]==32&&sent[i+1]==32)
{
for(;sent[i+1]!=0;i++)
{
sent[i]=sent[i+1];
}
sent[i]='\0';
i=0;
}
}
printf("\n%s",sent);
}
1 comment:
SportsLive.to
June 16, 2019 at 11:15 PM
Nice Good Effort
Sportslive.to
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
►
2010
(50)
►
January
(50)
►
Jan 30
(49)
►
Jan 23
(1)
▼
2009
(66)
►
November
(13)
►
Nov 30
(1)
►
Nov 15
(3)
►
Nov 14
(1)
►
Nov 12
(1)
►
Nov 11
(4)
►
Nov 04
(2)
►
Nov 01
(1)
▼
October
(53)
▼
Oct 30
(48)
Chap10[D]g Use structure to check dates
Chap10[D]e Displaying data in structure with condi...
Chap10[D]d Play Cricket
Chap10[D]c Automobile has weird serial numbers
Chap10[D]b Structure data of bank
Chap10[D]a Printing specfic datas in structures
Chap9[F]k Removing two vowels in succession
Chap9[F]j Abbreviating names
Chap9[F]i Deleting of all occurences of "the"
Chap9[F]h Deleting all vowels from a sentence
Chap9[F]e Creating a dynamic calendar
Chap9[F]c Reversing strings
Chap9[F]b Arrange words alphabetically
Chap9[F]a Replacing words in sentences
Chp9[D]f Removing two or more spaces in a string
Chap9[D]e Converting string digits to integers
Chap 9[D]d Working with strings is fun
Chap9[D]c Converting all lowercase to uppercase ...
Creating your own strcat()
Chap8[L]s Summation from first coordinate to las...
Chap8[L]r Computing straight line
Chap8[L]q Computing correlation coefficient
Chap8[L]p Area of triangle and largest plot of land
Chap8[L]o Standard deviation and mean
Chap8[L]L Finding norm of matrix
Chap8[L]d Creating grid puzzle
Chap8[L]c Transpose 4X4 matrix
Chap8[L]b Pick largest number from matrix
Chap8[L]a Initialising 3D array
Chap8[I]d
Chap8[I]c Finding smallest number in array using...
Chap8[I]b Check similar integers in array
No title
Chap8[I]a Reversing contents and copy to another ...
Chap8[D]d Sieve of Eratosthenes
Chap8[D]b Finding +tive -tive zeros, odd and even...
Chap 8[D]a Search quantity of instances in Array
Evaluating Sin(x) series
Running sum of first 25 numbers
Fibonacci Sequence
Sum of 5 digits using recursion
Average and percentage 5[F]c
Sum,Average Standard deviation 5[F]b
Product of float and integer 5[F]a
Finding prime numbers
Checking for leap year
Power function
Finding Factorial
►
Oct 29
(5)
About Me
bbb
Email: sohbingchang90@hotmail.com
View my complete profile
Nice Good Effort
ReplyDeleteSportslive.to