When you enroll in this course, you'll also be enrolled in this Specialization.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate
There are 4 modules in this course
The final course in the specialization Introduction to Programming in C will teach you powerful new programming techniques for interacting with the user and the system and dynamically allocating memory. You will learn more sophisticated uses for pointers, such as strings and multidimensional arrays, as well as how to write programs that read and write files and take input from the user. Learning about dynamic memory allocation will allow your programs to perform complex tasks that will be applied in the final part of the specialization project: a Monte Carlo simulation for calculating poker hand probabilities.
So far, our programs have had a rather limited interaction with the user or rest of the system, printing some results to standard output (typically to the terminal). Now that we have learned about topics such as strings and arrays, we are ready to learn how to write a program that takes input from the user, takes arguments on the command line, accesses files, and does many other things we typically think of real programs as doing.
Why We Need Interactivity and to Manage Memory•2 minutes
Reading a File with fgetc•4 minutes
Reading a File with fgets•5 minutes
Writing to a File•2 minutes
Closing a File•3 minutes
15 readings•Total 145 minutes
The Practice Programming Environment•10 minutes
Report a problem with the course•5 minutes
Introduction to the Operating System•10 minutes
Errors from System Calls•10 minutes
Command Line Arguments•10 minutes
Complex Option Processing•10 minutes
The Environment Pointer•10 minutes
Process Creation•10 minutes
Opening a File•10 minutes
Reading a File•10 minutes
Reading a File with fgets•10 minutes
Reading a File with fread•10 minutes
Writing to Files•10 minutes
Closing Files•10 minutes
Other Interactions•10 minutes
5 assignments•Total 150 minutes
The Operating System•30 minutes
Command Line Arguments and Process Creation•30 minutes
Opening Files and fgetc•30 minutes
Reading encryption.c•30 minutes
Writing and Closing Files•30 minutes
4 programming assignments•Total 120 minutes
Assignment 24_read_arr3•30 minutes
Assignment 25_break_encr•30 minutes
Assignment 26_tests_matrix_input•30 minutes
Assignment 27_matrix_input•30 minutes
Module 2: Dynamic allocation
Module 2•8 hours to complete
Module details
So far, most of the memory we have used has been located on the stack. Dynamic memory allocation gives a programmer much more flexibility, in that it allows you to request a specific amount memory to be allocated on the heap, so that it will not disappear with the stack frame of the calling function.
So far, we have focused exclusively on programming in the small—designing the algorithm for a small-sized task, implementing it, testing it, and debugging it. This module discusses three main differences that "real" programs exhibit. 1) They tend to be much larger than those we have written. 2) More than one person works on them, sometimes teams of hundreds to thousands. 3) Real software has a long life-span during which it must be maintained. Now that you have an understanding of the basics of programming in the small, we are ready to begin learning about programming in the large!
In this module, you will complete the Poker Project! Now that you know about dynamic memory allocation, user input, and how to program in the large, you can write the final parts of the program. You will write code to read in a file with a hand of cards and code to choose unknown cards from a shuffled deck. As you program with more sophisticated data structures, the importance of drawing good pictures will increase. Happy programming!
What's included
1 video1 reading3 programming assignments
Show info about module content
1 video•Total 4 minutes
Poker Project: Final Part•4 minutes
1 reading•Total 10 minutes
Share your learning experience•10 minutes
3 programming assignments•Total 240 minutes
Assignment c4prj1_deck•60 minutes
Assignment c4prj2_input•90 minutes
Assignment c4prj3_finish•90 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructors
Instructor ratings
Instructor ratings
We asked all learners to give feedback on our instructors based on the quality of their teaching style.
Duke University has about 13,000 undergraduate and graduate students and a world-class faculty helping to expand the frontiers of knowledge. The university has a strong commitment to applying knowledge in service to society, both near its North Carolina campus and around the world.
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Learner reviews
4.3
180 reviews
5 stars
64.64%
4 stars
15.46%
3 stars
8.28%
2 stars
1.65%
1 star
9.94%
Showing 3 of 180
O
OE
5·
Reviewed on Aug 2, 2019
i really loved the style of that course. the challenging assignments, depending more on reading and the continuous support through the discussion forums. i hope you make another extension to c++
Y
YX
5·
Reviewed on May 26, 2023
Well-structured course offering challenging coding projects and putting more emphasis on testing and debugging
D
DX
5·
Reviewed on Jun 13, 2021
It's very good for entering the world of progromming!
Will I receive a transcript from Duke University for completing this course?
No. Completion of a Coursera course does not earn you academic credit from Duke; therefore, Duke is not able to provide you with a university transcript. However, your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
When will I have access to the lectures and assignments?
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
What will I get if I subscribe to this Specialization?
When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Is financial aid available?
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.