top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Determine the set of inputs that will lead to SIGFPE (floating point exception) being triggered in following C program?

–1 vote
312 views

Determine the set of inputs that will lead to SIGFPE (floating point exception) being triggered in following C program?

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
    if(argc != 3 || !atoi(argv[2]))
        return 1;
    return abs(atoi(argv[1])) / atoi(argv[2]);
}
posted Jun 27, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

...