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

Answer Posted / aravind

int main()
{
int i;
char str[10];
gets(str);
for(i=0;i<=number;i++)
{
if(str[i]==' ')
str[i]=0;
}
printf("string without white space is=%s",str);
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List a few unconditional control statement in c.

555


Is that possible to store 32768 in an int data type variable?

687


What is main () in c?

584


What is the difference between the = symbol and == symbol?

619


When should a far pointer be used?

600






code for replace tabs with equivalent number of blanks

1631


What is string concatenation in c?

565


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

679


What are the types of operators in c?

608


What are structure types in C?

660


Explain can static variables be declared in a header file?

674


What is ctrl c called?

588


Write a program to reverse a given number in c language?

616


What is the difference between the expression “++a” and “a++”?

648


What is openmp in c?

608