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
Can you add pointers together? Why would you?
How do I swap bytes?
What are the modifiers available in c programming language?
What is the c language function prototype?
What is the use of bitwise operator?
Differentiate between Macro and ordinary definition.
What are the three constants used in c?
I have a varargs function which accepts a float parameter?
How many bytes are occupied by near, far and huge pointers (dos)?
What are pointers? What are different types of pointers?
What is exit() function?
Where register variables are stored in c?
Are comments included during the compilation stage and placed in the EXE file as well?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What's the right way to use errno?