Write a program in c++to declare the array of 10 floats and print them in reverce.
Answers
Answer:
Floating point is only one implementation and approximation for real numbers. Programming languages should abstract that detail. That is a lesson that C style hides from people.
What you are describing is a typical application problem-oriented requirement. For that you should use an application language not struggle with C++ which is a system language. Not only has it got system baggage, but the baggage of flaws from C.
Why are people teaching and learning programming with a system language with systems baggage? Application programming (and thus learning programming) should be abstracted from system-level details. Trying to learn the basics of programming while dealing with systems complications is not a good place to start.
Then C++ has not just systems baggage but baggage from C, which is a flawed language due to mistakes and then being based on constraints of late 1960s early 1970s.
All that is difficult for even professionals to deal with, not just those who are trying to learn basics. Here are some foundations: