I have upgraded my Ubuntu 16.04 to Ubuntu 18.04 and now the print screen is not working.
The default program to take screenshots in Ubuntu is
gnome-screenshot on terminal to know if the problem is in gnome-screenshot or something else. To provide you just a workaround, you can create another shortcut by going to -
System Settings -> Keyboard -> Shortcuts and press + button there. A menu like below will appear
gnome-screenshot in the name and
gnome-screenshot -w in command.
-w is for taking screenshot of the current window.
After entering name and command, press apply, and custom shortcut be added to your list. Click on the "Disabled", and the text should change to "New accellerator". This is where you set a new shortcut, for example -
Shift + Ctrl + Alt + C.