How do I write and use a function?

Now that you have realized that you need a function, you need to write one. Open main.c in your ClassCertificates project and write a new function named congratulateStudent. This function should go just before main() in the file.

#​i​n​c​l​u​d​e​ ​<​s​t​d​i​o​.​h​>​

v​o​i​d​ ​c​o​n​g​r​a​t​u​l​a​t​e​S​t​u​d​e​n​t​(​c​h​a​r​ ​*​s​t​u​d​e​n​t​,​ ​c​h​a​r​ ​*​c​o​u​r​s​e​,​ ​i​n​t​ ​n​u​m​D​a​y​s​){​
 ​ ​ ​ ​p​r​i​n​t​f​(​"​%​s​ ​h​a​s​ ​d​o​n​e​ ​a​s​ ​m​u​c​h​ ​%​s​ ​P​r​o​g​r​a​m​m​i​n​g​ ​a​s​ ​I​ ​c​o​u​l​d​ ​f​i​t​ ​i​n​t​o​ ​%​d​ ​d​a​y​s​.​\​n​"​,​
 ​ ​ ​ ​ ​ ​ ​ ​ ​s​t​u​d​e​n​t​,​ ​c​o​u​r​s​e​,​ ​n​u​m​D​a​y​s​)​;}​ i​n​t​ ​m​a​i​n​(​i​n​t​ ​a​r​g​c​,​ ​c​o​n​s​t​ ​c​h​a​r​ ​*​ ​a​r​g​v​[​]​)​ ...

Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.