int main()
{
int days;
printf("enter days you are late");
scanf("%d",days);
if (days<=5)
printf("5o paisa fine");
if (days<=10&&days>=6)
printf("1rs fine");
if(days>10)
printf("10 rs fine");
if(days=30)
printf("membership cancelled");
return 0;
}
tell me whats wrong in this program? is it right?
Answers were Sorted based on User's Feedback
Answer / hajera
1. & is missing in scanf and
2. if(days=30) one more equal is missing
instead of if(days == 30)
printf("membership cancelled")
| Is This Answer Correct ? | 2 Yes | 0 No |
Tell us something about keyword 'auto'.
What is sizeof return in c?
What is openmp in c?
Program to trim a given character from a string.
Is it better to bitshift a value than to multiply by 2?
without a terminator how can we print a message in a printf () function.
You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less.
char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable)
Write a program to implement queue.
dibakar & vekatesh..uttejana here..abt ur reply for in place reversal of linked list..wats p stands for there?
what is a c-language.what is do.
how to find sum of digits in C?