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


Please Help Members By Posting Answers For Below Questions

Explain what are linked list?

613


How do I read the arrow keys? What about function keys?

606


How many keywords (reserve words) are in c?

603


How do you construct an increment statement or decrement statement in C?

731


Explain can you assign a different address to an array tag?

633






What is page thrashing?

644


Define Spanning-Tree Protocol (STP)

634


What are c preprocessors?

664


Can you return null in c?

589


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

754


Explain 'bus error'?

545


Can you explain the four storage classes in C?

633


What are type modifiers in c?

612


What is the use of header files?

590


How is a null pointer different from a dangling pointer?

549