Skip to content

The C Challenge - VirtualBox troubles

I finally wanted to continue my foray into C. But, shockingly, my VM in Virtual Box refuses to start. And neither does a new VM.



Cannot access the kernel driver!




Cannot access the kernel driver!


 


I tried reinstalling and I tried manually installing the driver from "C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv". So far I'm out of luck. I'm going to keep you updated on my progress resolving this issue.


 


Update: A repair install did the trick. I will probably never know why a regular reinstall did not help.


The C Challenge - Picking it up again

I plan to pick up C again next week. I will continue with Excercise 23 but I will also look into some more practical applications of what I've learned so far to learn from real challenges. I'm not sure yet what to do, though. I'm quite interested in networking related stuff, so I guess I could look into some simpler tools and try to understand the source, fiddle with it and perhaps implement some of them myself.

The C Challenge - Hiatus

I decided to put C on hold for a few days. I think I am at a point were I have to let the theoretical foundations covered so far settle for a bit before I continue.

The C Challenge - Day 9

Today I did Excercise 20 & 22. The Debug macros presented in chapter 20 look useful, but again I have to think, that I could have never come up with something like that. ;-) Writing "goto" felt strange, though. But I get what it's used for and it actually helps structure the program.



I can't say much about chapter 22, but I noticed that Scope of variables is something that needs special attention in C, especially regarding the local scope within control structures.


The C Challenge - Day 8

It's monday again. Mondays are not the best days. Anyway, my goal was to do something every day, so I decided to skip Excercise 20 for today and concentrate at Exercise 21. It offered an overview about the datatypes and control structures in C. I definitely have to come back to them. I think the more I use them the more cnfident I will become in their use. In general there was not much new but the details vary from the languages I'm used to.


The C Challenge - Day 7

Today I did Exercise 18 & 19. Excercise 18 introduced pointers to function. An interesting concept that reminded me of interfaces. It is like building (and using) interfaces by hand. In the following excercise (19) we put everything we learned in the last chapters to use in some sort of prototype based object system. It was very interesting but at the moment I doubt I could have ever come up with something like that.

The C Challenge - Day 6 - Revisited

Today I did no new chapters because I spend the day with not computer related things. In the evening I decided to revisit the exercises 16 & 17 so I'm prepared to do excercise 18 and the following exercises tomorrow.



I searched for ways to make the program work with arbitrarily sized row numbers and data fields. I also explored how to work around the problems with strncpy.

The strncpy problem was quite easy to solve. Just add code that sets the last char in the target string always \0. Or just don't use this function at all, like lots of sources recommend. ;-)

Reworking the program to make it work with arbitrarily sized data was more challanging and I have to admit, that I failed for now. I will probably come back to it later, but for now I will continue with the next exercises.


The C Challenge - Day 6

I did Exercise 16 & 17 today. Initially I had planned to do Excercise 18 too, but I have to admit, that it was enough for the evening. Understanding the Structs and Pointers and the working of Stack and Heap proved challenging and interesting. I spent almost 3 hours fiddling and toying with the example programs and I'm still not quite finished with "Extra Credit" portion of No. 17. Inbetween I wrote my own little program to try out some string and string pointer operations, which greatly improved my understanding of the topic.



Structs are really an interesting topic. They remind me of the structures in ABAP, though on a much lower level. They also feel a bit like a raw sort of proto objects to me.


The C Challenge - Day 5

After a tiring day at work I only did Exercise 15 today. It's the exercise on pointers and I'm pretty sure that I have to read it again tomorrow. I mainly did it because I want to do at least one chapter every day. The plan for tomorrow is to do the chapters about Structs, Heap & Stack and Pointers to Functions. I think those are pretty fundamental topics so I have to put a special focus on them.

The C Challenge - Day 4

Today I did Exercise 11 to 14. I will leave the pointers for tomorrow.



I learned about while, if and switch. The topics were not exactly new for me, but there are still small differences to languages that I'm used to.

An interesting thing about the switch statement in C is that the cases have "fall through" which could be translated to "Durchfall" which means "diarrhoea". Now I know where this idea in Java comes from.

Excercise 14 offered an insightful first overview about functions in C. I suspect that there is more to it later in the course.