typedef struct
  int rno;
  char name[10];
  float marks;
 stu stu3;
 void getf(stu * stutmp);
 void show(stu * stutmp);
 void main()
  void getf(stu *stutmp)
  scanf(" %d",&stutmp->rno);
  scanf(" %s",stutmp->name);
  scanf(" %f",&stutmp->marks);
 void show(stu * stutmp)
  printf("Name: %s\n",stutmp->name);
  printf("RNO: %d\n",stutmp->rno);
  printf("MARJKS: %f\n",stutmp->marks);

SUMMARY: Some compilers for small machines, including Turbo C (and Ritchie's original PDP-11 compiler), leave out certain floating point support if it looks like it will not be needed Read this FAQ - http://c-faq.com/fp/fpnotlinked.html

The program needs the floating-point library, but the library was not linked to the program.
One of the following may have occurred:

  1. The program was compiled or linked with an option (such as /FPi87) that required a coprocessor, but the program was run on a machine that did not have a coprocessor installed.
  2. A format string for a printf or scanf function contained a floating-point format specification, and the program did not contain any floating-point values or variables.
  3. The compiler minimizes a program's size by loading floating- point support only when necessary. The compiler cannot detect floating-point format specifications in format strings, so it does not load the necessary floating-point routines.
  4. Use a floating-point argument to correspond to the floating-point format specification, or perform a floating-point assignment elsewhere in the program. This causes floating-point support to be loaded.

Read an article posted by Siddant3s - http://siddhant3s.googlepages.com/how_to_tell_rusted_cpp.html

commented: Out of all the times I've been to that FAQ, I never noticed this one there. +24