Saturday, February 16, 2019

C Program & I/O statements

C Program & I/O statements.

 Structure of C Language program
 // Comments     Optional # Preprocessor
directive   Compulsory Global Variables;
 Optional
 main ( )     Compulsory Function {
Local variables; Statements;
}
 User defined function 1   Optional
Function {
Local variables; Statements;
}
 User defined function 2    Optional
Function
…      User defined function n   Optional
Function

Compilation & Execution of C program 
Preprocessor:    
The source code is firstly passed through
the preprocessor. It expends this code by
performing the preprocessing directives and
then passes it to the compiler.
Compiler:
The expended code is passed to the compiler.
 It converts this code into the machine's
assembly language code.

Assembler:  
It converts the assembly code into object code. The name of the object file is same as
the source file. In DOS the object file has
extension “.obj" and in UNIX the extension
is ' .o „.

Linker:
 Generally, all programs written in c use
library functions.  Library functions are
precompiled and their object code is
stored in library files with ' .lib ' or ' .a '
extension. The linker combines the object
code of the library functions with the object
code of our program.

      Our program may also contain references to 
functions that are defined in other files. The 
linker links the object code of these files also 
to our program. So the job of linker is to 
combine the object code of our program 
with the object code of other files and object 
code of library functions. The output of the 
linker is an executable file. 

Wednesday, February 13, 2019

BASICS OF HEAT TRANSFER

Difference between heat and temperature
In heat transfer problems, we often interchangeably use the terms heat and temperature. Actually,
there  is  a distinct difference between the two. Temperature is  a measure of the amount of energy
possessed by the molecules of a substance. It manifests itself as a degree of hotness, and can be used
to predict  the  direction of heat  transfer.  The  usual  symbol for temperature  is T. The  scales  for
measuring temperature in SI units are the Celsius and Kelvin temperature scales. Heat, on the other
hand, is energy in transit. Spontaneously, heat flows from a hotter body to a colder one. The usual
symbol for heat is Q. In the SI system, common units for measuring heat are the Joule and calorie.