|
所在平台: Coursera |
课程主页: https://www.coursera.org/learn/interacting-system-managing-memory
课程评论:没有评论
课程名称:与系统交互和内存管理 概述:本课程是“C语言编程入门”专项中的最后一门课程,将教授您与用户和系统交互以及动态分配内存的强大编程技巧。您将学习指针的更复杂用途,例如字符串和多维数组,以及如何编写读取和写入文件并接受用户输入的程序。了解动态内存分配将使您的程序能够执行复杂任务,这些任务将应用于专项项目的最后部分:蒙特卡洛模拟,用于计算扑克手牌概率。 课程大纲: - 模块1:与用户和系统交互 描述:到目前为止,我们的程序与用户或系统的交互相对有限,只是将一些结果打印到标准输出(通常是终端)。现在,我们已经学习了字符串和数组等主题,准备编写可以接收用户输入、命令行参数、访问文件等的程序。 - 模块2:动态内存分配 描述:到目前为止,我们使用的大部分内存位于堆栈上。动态内存分配为程序员提供了更多灵活性,允许您请求在堆上分配特定数量的内存,这样内存就不会随着调用函数的栈帧消失。 - 模块3:大规模编程 描述:到目前为止,我们专注于小规模编程——为小任务设计算法、实施、测试和调试。本模块讨论“真实”程序所表现出的三个主要区别:1) 它们通常比我们编写的要大得多。2) 多个人共同参与,往往是成百上千人的团队。3) 真实软件有较长的生命周期,需要进行维护。了解小规模编程的基础后,我们准备开始学习大规模编程! - 模块4:扑克项目 描述:在本模块中,您将完成扑克项目!现在您了解了动态内存分配、用户输入以及大规模编程的知识,可以编写程序的最后部分。您将编写代码来读取包含手牌的文件,并编写代码从洗牌的牌组中选择未知的牌。随着您使用更复杂的数据结构进行编程,绘制良好图像的重要性将增加。祝您编程愉快!
Name:Module 1: Interacting with the user and system
Description: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.
Name:Module 2: Dynamic allocation
Description: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.
Name:Module 3: Programming in the Large
Description: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!
Name:Module 4: Poker Project
Description: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!
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.