Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can you add pointers together? Why would you?

1191


How do I swap bytes?

1123


What are the modifiers available in c programming language?

1282


What is the c language function prototype?

1145


What is the use of bitwise operator?

1179


Differentiate between Macro and ordinary definition.

1475


What are the three constants used in c?

1048


I have a varargs function which accepts a float parameter?

1099


How many bytes are occupied by near, far and huge pointers (dos)?

1220


What are pointers? What are different types of pointers?

1226


What is exit() function?

1075


Where register variables are stored in c?

1005


Are comments included during the compilation stage and placed in the EXE file as well?

1135


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

1181


What's the right way to use errno?

1206