How to removing white spces in c programming only bu using
loops
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Why do we use int main instead of void main in c?
What is an example of structure?
Taking an example,differentiate b/w loader and linker ?
Explain is it better to bitshift a value than to multiply by 2?
to get a line of text and count the number of vowels in it
What does *p++ do?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Tell me the use of bit field in c language?
What is default value of global variable in c?
What is the relation between # and include<stdio.h>
what is the meaning of java that is (J A V A) full form of JAVA
71 Answers AKS University, Bhel, BNL, BPO, HCL, Peacecon,
Can stdout be forced to print somewhere other than the screen?