1. The C function is perfectly okay & valid, just if u add a ';' at d
end of "printf" statement. And while the function you need to pass
some integer parameter to the function.
2. The o/p of this code should have been: -2311 but god knows how is
it coming: -2301.... if u have any explanation please reply...
3. Size of a datatype depends on the operating system it is
implemented upon, but is usually 2 bytes. (2 under Windows & 4 under
Unix and similar OSs'.).
4. Can u plz elaborate "portability" in this context? All 3 ways are
obviously valid just that:
1: gives garbage value for the first element of the array,
2: gives its address in segment:offset format,
3: gives same value as in 1.,
4: gives unsigned long garbage value...
5. conio.h isn't a standard ANSI header file. For a list of ANSI C
Standard Library refer:
http://en.wikipedia.org/wiki/C_standard_library
Hope I'm satisfactorily correct. :)