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 |
What is a built-in function in C?
Multiply an Integer Number by 2 Without Using Multiplication Operator
wap to print "hello world" without using the main function.
Compare interpreters and compilers.
What is meant by keywords in c?
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3
There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
how memory store byte
Is it possible to pass an entire structure to functions?
What is the difference between call by value and call by reference in c?
write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?