suppose if i declare a local variable, where it will be stored? RAM/ROM?
In Keil, it will be stored wherever you've told the compiler to put it. By default, everything will be placed in RAM unless you've told it to put it in ROM via the "code" keyword. You need to read the compiler manual for simple things like this.
I have one more doubt. Where will the function parameters be stored? will it be stored in RAM? Krishna
Typically, Keil passes function parameters in registers for speed. The registers are, of course, in the internal data RAM of the 8051. I'm not sure there's any way to pass function parameters in ROM, unless the function is somehow ONLY called with constant values. Even then, I doubt any compiler would make the assumption that it's ok to put parameters in ROM.