Questions tagged [c]

Questions about instruction specific to the programming language C. Use this tag only when the language used would affect the question significantly (if your question uses C as an example, but does not focus on the language itself, you need not use the tag).

Filter by
Sorted by
Tagged with
23
votes
5answers
4k views

Why teach C using scanf without talking about command line arguments?

Most of the books I read give examples using printf and scanf. At some point the students know perfectly how to use these two ...
13
votes
11answers
3k views

What should be included in a best practices C course?

At our University, we have in the first semester a very difficult C Introductory Course, that consists of presenting a shortened version of the language specification: What are for/while loops, if ...
11
votes
4answers
848 views

Should I teach modern web development in an introductory programming course? How?

I'm currently teaching a introductory programming class in a technological university course (FYI, this is a type of university course that is not a BS). The recommended language to use for this ...
10
votes
5answers
469 views

Lesson Idea: Arrays, Pointers, and Syntactic Sugar

One of the most challenging concepts to instill in new CS students is 0-indexing (indeed, the pedagogy of this fact probably merits its own discussion). Another difficult topic -- although a slightly ...
8
votes
5answers
708 views

Simple Pointer Examples in C

Thanks to feedback in this thread, I'm beginning to plan how to integrate a basic introduction to pointers into my unit on arrays. Here's a sample program I just wrote up: ...
5
votes
3answers
293 views

Teaching C++ to students that know Java

I am now teaching an OOP course to 2nd year undergrads. This is actually a course in advanced programming in Java. In the next semester, I am going to teach the same students, a C++ course. From what ...
4
votes
3answers
115 views

Lesson ideas for introducing macros in C

Thanks to working with Racket recently, I've been spending a lot of time learning about and implementing non-trivial macros. In the process, I have been thinking about ways to apply this skill to my ...
4
votes
1answer
235 views

Enjoyable and\or fun way to explain cmake

As a pilot project (which was delayed by an incredible amount, seeing as it's starting 8 weeks after it was meant to), my school grouped together a few kids (high school, they know basic OOP and work ...
2
votes
3answers
132 views

Why and how is it efficient to process sorted arrays than unsorted arrays?

It is well accepted that processing sorted arrays is easier and efficient. What would be the pedagogical approach to explain how and why it is more efficient to process sorted collections than ...
2
votes
2answers
113 views

Teaching intermediate Java to students familiar with C

The class I teach (a class whose teacher I assist1, to be precise) is learning intermediate Java this year (data structures, basic OOP and a few lessons about how Java actually works). A few of the ...
0
votes
3answers
186 views

Teaching pointers (C) to a Java guy [closed]

I have already looked at this and this, but it does not help me at all. I am teaching a guy who is something of a Java expert. Unfortunately, due to the mandatory-ness of the university curriculum, ...