Skip to content

Conversation

@sharmanityam252
Copy link

Below program will give Segmentation Fault:

Below program will give Segmentation Fault:
@sharmanityam252
Copy link
Author

Segmentation Fault:

@sharmanityam252
Copy link
Author

// C++ program to demonstrate
// Floating Point Error
#include
using namespace std;

// Driver Code
int main()
{
int a = 1, b = 0;

// When we try to divide by zero 
// it should give SIGFPE 
cout << a / b; 
return 0; 

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant