Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Hi, new to the C world, looking for some basic elementary help
Hi, I've recently taken this computer course for one of the requirements for my university program. I was wondering if some of you could help field a few questions. I was playing around with Dev C++, and was writing a very basic program that printed some info, and required some data input. However I was wondering, at the end of my program it terminates almost immediately and I am unable to view the resultant info. How can I make it so the program terminates only when i press a key on the keyboard? Another question is field width, lets say i want to specify the field width for a double value such as %5.2lf.....i understand that there will be two values after the decimal because of the .2, but what about the 5...does that mean i will have 5 places of value infront of the decimal? What if I dont require that many spaces, such as a value of 34.23?
Also we are programming in C, if that was not clear.