#include <stdio.h>
void main()
{
int a;
printf("Enter value of a = ");
scanf("%d\n",&a );
a = a + 10;
printf("The final value of a is %d",a);
}
when i am running this simple program it stops showing result. It executes only upto 'scanf'... After entering the 'a' value it is not showing the final result value.(i.e. 56, if a is entered 46) and i have to stop it forcefully from 'windows task manager'.
why it does happen and what is the solution?
Thank you.
void main()
{
int a;
printf("Enter value of a = ");
scanf("%d\n",&a );
a = a + 10;
printf("The final value of a is %d",a);
}
when i am running this simple program it stops showing result. It executes only upto 'scanf'... After entering the 'a' value it is not showing the final result value.(i.e. 56, if a is entered 46) and i have to stop it forcefully from 'windows task manager'.
why it does happen and what is the solution?
Thank you.
Comment