Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to removing white spces in c programming only bu using
loops

Answer Posted / ranj

Aravind has done few mistake in printing the no,
the correct format should like this

int main()
{
int i,number;
char str[10];
gets(str);
number=strlen(str);
printf("String without white space\n");
for(i=0;i<number;i++)
{
if(str[i]==' ');
else
printf("%c",str[i]);
}
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is memcpy() function?

1069


What is the difference between %d and %i?

1064


Write a program that accept anumber in words

1724


Is printf a keyword?

1170


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1200


What are the header files used in c language?

1009


what are bit fields? What is the use of bit fields in a structure declaration?

2077


How to write c functions that modify head pointer of a linked list?

955


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2150


Which is better malloc or calloc?

1073


In c language can we compile a program without main() function?

1083


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

1111


write a c program for swapping two strings using pointer

2587


How are variables declared in c?

1052


How do you list a file’s date and time?

1041