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



int main() { int days; printf("enter days you are late"); scanf("%d",days..

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

int main() { int days; printf("enter days you are late"); scanf("%d",days..

Answer / sandeep

Guys '&' is missing in the scanf statement

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

Why Modern OS are interrupt driven?Give an example

3 Answers  


What is the difference between scanf and fscanf?

0 Answers  


Explain how can I remove the trailing spaces from a string?

0 Answers  


What is conio h in c?

0 Answers  


Why c is called procedure oriented language?

0 Answers  






program to convert a integer to string in c language'

0 Answers  


The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);

1 Answers   HCL, Public Service Commission,


What are the modifiers available in c programming language?

0 Answers  


What is the concatenation operator?

0 Answers  


What are c header files?

0 Answers  


in a town the percentage of men is 52 the percentage of total literacy is 48 if total percentage of literate men is 35 of the total population write a program to find the total no of the literate men and women if the population of the town is 80000

3 Answers  


What is the use of f in c?

0 Answers  


Categories