Is there any C system call for getting the major number and minor number from a device file in solaris?
You can use one of the stat family functions. The numbers are in the st_rdev field. Use the major/minor functions defined in sys/mkdev.h to retrieve them.