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 the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (ā%d\nā,j); }
Program to find the absolute value of given integer using Conditional Operators
Explain the properties of union.
What is keyword with example?
write a program to interchange the value between two variable without using loop
swap two integer variables without using a third temporary variable?
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type
What does the c preprocessor do?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
What happens if you free a pointer twice?
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
Differentiate Source Codes from Object Codes