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
Can we assign string to char pointer?
What do you mean by dynamic memory allocation in c? What functions are used?
Explain how can I remove the trailing spaces from a string?
Is this program statement valid? INT = 10.50;
What is modifier & how many types of modifiers available in c?
what are # pragma staments?
Explain 'bit masking'?
Explain what is wrong with this program statement? Void = 10;
Explain threaded binary trees?
what is the height of tree if leaf node is at level 3. please explain
What is file in c preprocessor?
Which header file is used for clrscr?
Why double pointer is used in c?
Can two or more operators such as and be combined in a single line of program code?
Why is not a pointer null after calling free?