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?
Answer Posted / 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 |
Post New Answer View All Answers
Explain what are linked list?
How do I read the arrow keys? What about function keys?
How many keywords (reserve words) are in c?
How do you construct an increment statement or decrement statement in C?
Explain can you assign a different address to an array tag?
What is page thrashing?
Define Spanning-Tree Protocol (STP)
What are c preprocessors?
Can you return null in c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
Explain 'bus error'?
Can you explain the four storage classes in C?
What are type modifiers in c?
What is the use of header files?
How is a null pointer different from a dangling pointer?