Yes you can take upsc exam during service of pcs officer. But you should be eligible as per norms of UPSC If you are eligible than you can definitely take the upsc exam.
For checking eligibility you can refer to upsc official website.
Hope this information help you
ALL THE BEST
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile