Case 1: structure declared outside main() working fine
main()
#include #include struct prod { int price,
It have to do about scoping, when you define the structure inside the main function then it's only defined in the scope of the main function, so the billamt function can't know about it.
main
billamt