I receive 3 arguments NaN, +infinity and -infinity and I want to generate manually NaN,+inf,-inf by changing the exponent and the mantissa of the IEEE 754 number. How can I do it and save it after into a float array?
#include <stdio.h>
#include <stdlib.h>
int main(int argc,char*argv[]){
int n=argc;
float array[n];
int i;
for(i=0;i<n;i++){
array[i]=argv[i];
float number = argv[i];
printf("the array[%f] is : %f",i,number);
}
return 0;
}