Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C "DIVISION" ERROR

Status
Not open for further replies.

soodvarun

Programmer
Apr 21, 2001
40
CA
void main()
{
int k=100;
printf("%d",k/0);
}

WHY IS THE OUTPUT OF printf ABOVE IS 100 ???
 
Build with Microsoft Visual C++, the program abends.


Which 'compiler' do you use ?

/JOlesen
 
The output of this program is not 100. In stead it should and it does lead to an "Assertion failure" error on MS platform and some other error in other platforms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top