Thanks guys. I'll pass it on.
@noway2 I'll get her to do that after finals. FWIW, this class is a wash. She had a shot until the final project. She just stopped and turned it in incomplete because she needed to focus on other classes. Failing one class is bad. Hurting your grade in other classes to try and save a class you fail anyway is also a bad idea. So she has cut her losses for the semester.
Understand. I agree, it sucks, but as the saying goes, don't throw away good money after bad.
I think she is having issues with "pointers", Addresses, maloc, and calloc. Sounds like pointers and addresses were the big ones. She does fine on the tests it's the application of it in the projects that's her problem.
This is arguably one of, if not the, most complex areas of C. One of the things that differentiates C from other languages (such as the ones you mentioned in the post after this, e.g. Python) is that the variables are "strongly typed". What this means is that you need to tell the compiler, in a declaration that the variable x is going to be of type (int, char, float, double), etc. What this does is allow the compiler to efficiently allocate appropriate amounts of memory according to the size of the variable, because different variables can have different sizes and what's more is that the size is platform dependent. As an example, a variable of type 'char' or character will likely be one 'unit' of memory and if the machine uses bytes (8 bits) as it default size a 'char' variable will likely be one byte. A double, as in double precision (extra significant decimal digits) floating point will be bigger, such as 8 bytes.
The point is that by "typing" the variables, the compiler knows how to allocate memory.
Where things get weird, or actually quite powerful, but in ways that can also get you into deep doo-doo is that C allows you to access variables in a de-references fashion, with what are called pointers. For example, if we have a variable x of type int (integer) the compiler will store it at some random address. We can also have a variable of type int* (a pointer to an int) that holds the address of x, (y = &x, meaning y equals the address of x) and we can access the variable x in oblique ways using it.
This concept ties into arrays, and especially when you get into multi dimensional arrays. The arrays are nothing more than several memory boxes of some type stacked together and you can logically stack them in multiple dimensions (though they're just laid out flat in the computer memory). The tricky part, and the part the teachers love to put on the tests, are having you show the output of a bit of code that loops through these arrays in some fashion. It's a lot of stuff to hold in your head all at once.
And I think this is the Prof that does not give them functioning examples. My daughter is good at reverse engineering the projects to figure them out. When she has a functional example she can find her mistakes and fix her problem. Her other Profs do this. He also won't code with the class. He just lectures. And she is a huge visual learner and learns best by doing. His teaching style seems to hit all her weaknesses.
That's possible. It's also possible he's one of "those" types. I had one that you needed to know this 'trick' that wasn't taught in the text book to solve 4 out of 5 test problems. It was a simple trick but he wouldn't teach it, I think you needed to go to his office and somehow negotiate with him and no surprise the only student who understood the topic was the one female whose day job as at a strip club. One day someone asked him to show us an example. He took the chalk and eraser, went to the corner of the chalk board, did the tiniest example while hiding it with his hands, quickly erased it, and then turned around, smiled and said, "See how easy that is?". (I wish I had a cell phone camera back then - and I would have reported him).
@noway2 talking to here now. She has done classes for Python, Java, Java Scripts, MIPs some, SQL in database this semester. And a couple variants of Java.
Ah, sounds like she speaks my kind of language. Interesting that they are teaching MIPs still, which was taught when I went to CWRU in the early 2000s. It's a pretty neat and simple assembly language. (side note, computers only speak in numbers, ones and zeros, specifically, and they follow a set of algorithms in processing them. One of the lowest (not quite the lowest) language is called machine code, which are these ones and zeros - think punch card type level. A step up from this is called assembly which uses pneumonic and codes to abstract this and make it more human readable. A compiler like C takes the even higher level language and breaks it down into assembly).
Python is a very common, easy to learn, language used heavily today. It's syntax is similar to C, but it does all the variable 'typing' for you behind the scenes. The exchange penalty is that C can be made to run faster. Never got into Java much, it had it's hey day back in the late 90s I think. Java Script is a language that runs on the client (your) side of the web browser, an SQL, which stands for Structured Query Language, is used to pattern match to get data from a database. With it, you can ask things like "select and display all the CFF users whose handle begins with chief".
Also, I understand nothing of what I just typed.
Ha ha. No worries.