What is junk value?(in programming languages)
Answers
Answered by
5
#include<stdio.h>
#include<math.h>
main()
{
FILE * fp;
struct
{
int a;
float b;
}file;
fp = fopen("Y.TXT","w+");
printf("enter the value of a :");
scanf("%d",&file.a);
printf("\n");
file.b =sin(file.a);
printf("%d",file.a);
printf("\n");
printf("%f",file.b);
fwrite(&file,sizeof(file),1,fp);
fclose(fp);
}
#include<math.h>
main()
{
FILE * fp;
struct
{
int a;
float b;
}file;
fp = fopen("Y.TXT","w+");
printf("enter the value of a :");
scanf("%d",&file.a);
printf("\n");
file.b =sin(file.a);
printf("%d",file.a);
printf("\n");
printf("%f",file.b);
fwrite(&file,sizeof(file),1,fp);
fclose(fp);
}
Similar questions