Write a functionprint_str that works as follows. If ptrint_str is invoked with one argument sof type string, it prints s or the first 10 characters in s, whichever isshortest. If print_ptr is invoked with two arguments-s, a string, and n, anint- it prints s or the first n characters in s, whichever is shortest. Write amain function that invokes print_str several times to demonstrate thatprint_pstr is working properly.