English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

is it related to functions in c language

2007-11-24 02:23:30 · 2 answers · asked by pok 1 in Science & Mathematics Engineering

2 answers

A subroutine is a useful piece of code that performs a function that could be needed many places in a program. An example would be code that converts a Fahrenheit temperature reading to Celsius. A program that works a lot with temperatures would call that subroutine many times instead of having to take space to put the code inline everywhere it is needed. The advantage is you write it once and if if you find an error you only need to fix it at one location plus it can save a lot of memory by appearing only one time in the porgram.

Diagnostic subroutines are ones that run useful tests on the hardware and the operating system. In safety applications a PROM checksum routine is run at startup and periodically during operation to ensue program has not been corrupted. Other diagnostic ones could run a memory pattern on RAM or verify that the operating system is not stuck in a loop.

2007-11-24 02:43:01 · answer #1 · answered by Rich Z 7 · 1 1

rich z answer is perfect-what more could i say-give him a thumb up

2007-11-24 03:15:58 · answer #2 · answered by jamus d woespuss 4 · 0 0

fedest.com, questions and answers