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 |
What are void pointers in c?
What is the difference between exit() and _exit()?
what is inline function?
What are the types of i/o functions?
Explain goto?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
show how link list can be used to repersent the following polynomial i) 5x+2
what is different between auto and local static? why should we use local static?
what is used instead of pointers in java than c?
Mention four important string handling functions in c languages .
where do we use volatile keyword?
What is the difference between malloc() and realloc()?