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 |
Write a program to find given number is even or odd without using any control statement.
How to print %d in output
write a function that accepts an array A with n elements and array B with n-1 elements. Find the missing one in array B,with an optimized manner?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }
How can I write a function analogous to scanf?
How to add two numbers without using semicolon at runtime
what is pointer ? what is the use of pointer?
int i=~0; uint j=(uint)i; j++; printf(“%d”,j);
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Why is %d used in c?
what is the difference between postfix and prefix unary increment operators?