Error in code...Overflow Issue

I am not able to identify where I am making a mistake… How can I prevent the overflow issue

Do you have a C++ code for this?

Here is your corrected code https://ide.codingblocks.com/s/184969, you don’t need to handle overflow issue in python, instead you had to print
C(n-1,n-k)

but in the video it was said that the answer is C(n-1,k-1)