Sir pls tell whats the error in this code

its giviing segmentation fault might be we are missing on some point