//Link float error solution
#include<stdio.h>
#include<conio.h>
struct Employee{
int empno;
char name[50];
float salary;
};
void floatError(float *a){
float b=*a;
floatError(&b);
}
void showDetails(struct Employee *emp){
printf("\n %d %s %f",emp->empno,emp->name,emp->salary);
}
void main(){
struct Employee e1;
struct Employee e2;
clrscr();
e1.empno=1001;
strcpy(e1.name,"Krishna G");
e1.salary=29999.879;
e2.empno=1002;
strcpy(e2.name,"Nanda Gopal Krishna");
e2.salary=59999.987;
showDetails(&e1);
showDetails(&e2);
getch();
}
Friday, April 22, 2016
Floating point error in c - struct
Subscribe to:
Post Comments (Atom)
Spring Boot 3 : JWT with SecurityFilterChain, AuthorizeHttpRequests, RequestMatchers
pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0...
-
Installation of MongoDB The executable file needs to be downloaded from: https://www.mongodb.com/download-center?jmp=nav#communit...
-
Form to add multiple rows: <! DOCTYPE html> <%@ page language = "java" contentType = "text/html; cha...
No comments:
Post a Comment