UId

is tty command opens a process in the system if yes then why process got the userid?????

I do not understand the question. Please write your question in good English language.

Best guess:
The "tty" command executes within the current user environment. It is a privileged system command and and is thus allowed to obtain detail about the current user.

My question is that the 'tty'-> "terminal producing" command opens a new process in the system??????
if yes then why it gets the user id for that????? because it is a process.
so it should get the process id not user id......

What makes you think it's getting a UID?

a file /etc/inittab has all the enteries of tty nd there is written a number which is same for all tty's so asked is that a userid or something else?

Please post an example of the lines from /etc/inittab and mention what Operating System you have.
There is an explantion of /etc/inittab fields in "man inittab".

If yours looks something like this:
ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600

The "234" are three run states 2,3,4 . The 9600 is the baud rate of the serial terminal port.

On many of my systems there are no "tty" entries in /etc/inittab because there are no serial terminals installed on the computer (except the console which is not a tty). Telnet sessions are allocated pseudo-ttys (pts) by the telnet daemon and do not appear in /etc/inittab.

There is a unix command called "tty" which tells you the device name of your current terminal. That is what I thought your enquiry was about.