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
Which header file is essential for using strcmp function?
What is #error and use of it?
Why we write conio h in c?
What is the benefit of using #define to declare a constant?
What is "Duff's Device"?
Differentiate call by value and call by reference?
What are the types of bitwise operator?
What is the scope of local variable in c?
Should I learn c before c++?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
What is difference between structure and union with example?
What is difference between array and structure in c?
write a program to print data of 5 five students with structures?