• Log in or sign up for an account here: https://www.sythe.org/login

Fun exam questions

Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Most operating systems including Windows NT and the Linux kernel are still written entirely in C, with some higher-level components written in C++.
 
Most operating systems including Windows NT and the Linux kernel are still written entirely in C, with some higher-level components written in C++.

That is true. However, considering the whole world of programming, operating systems play a very small role. Unless you have to program specifically in C for some reason, if there are alternatives, people would not choose C.

Same thing applies for Assembly language. Even though it is still extremely crucial in hardware design and reverse engineering, it cannot be considered popular or worthy to learn.
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Ever since Visual Studio .NET, the only way to write native Windows applications in Visual Studio is through C and C++. C is marginally faster than C++ (objects have an overhead), so unless you're using something like MFC, there is no reason to not use C.

I used to use the MFC AppWizard for my autos, but ever since discovering how much nicer plain-old Windows API is, I now use C instead.
 
Ever since Visual Studio .NET, the only way to write native Windows applications in Visual Studio is through C and C++. C is marginally faster than C++ (objects have an overhead), so unless you're using something like MFC, there is no reason to not use C.

I used to use the MFC AppWizard for my autos, but ever since discovering how much nicer plain-old Windows API is, I now use C instead.

Being plain and simple boosts speed of programs written in C. But in real world, run-time speed does not determine everything. Beside run-time speed, there is also speed of coding, speed of troubleshooting, speed of getting general support, speed of learning the language... Yea I am talking about it in a business perspective rather than strictly coding perspective. If you need to program for money or a living, C is not the best because most of the time, programming involving C requires much more time and effort for very simple tasks in general applications and time is money so you lose money here. :)
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Ah, but, when dealing with the Windows API, the only difference between C and C++ code is one that has to do with the language itself, not the API:

The latter language can have variable declarations anywhere, whereas the former must have all variables declared at the beginning of the block indicating their scope. Everything to do with Windows programming; the message loop, the API functions, resources, etc. are just as easily accessible through either language.

Unless you're using or creating an object, is there really any reason to not use C over C++?
 
Ah, but, when dealing with the Windows API, the only difference between C and C++ code is one that has to do with the language itself, not the API:

The latter language can have variable declarations anywhere, whereas the former must have all variables declared at the beginning of the block indicating their scope. Everything to do with Windows programming; the message loop, the API functions, resources, etc. are just as easily accessible through either language.

Unless you're using or creating an object, is there really any reason to not use C over C++?

I am afraid you are going off-topic here. I only wanted to point out not to waste too much time on C considering many other languages. Of course, one can learn C and have fun with it and even use it to make money if wanted to. I never said you must absolutely not learn or use it. When I said C became quite obsolete, I meant its popularity had gone down because of many reasons. If you can zoom out on your thinking, consider many other languages beside C, you can clearly see what I am trying to say. Just pointing out the fact in real world, not just my own opinion. :)
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
I do use other languages :)
I just like C more :P
 
I do use other languages :)
I just like C more :P

I also like C, remember Turbo C or Borland C in the old day. It was so fast and so simple. :D When I was forced to learn other languages simply because other people started to leave C, I was so disappointed.
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
I also like C, remember Turbo C or Borland C in the old day. It was so fast and so simple. :D When I was forced to learn other languages simply because other people started to leave C, I was so disappointed.

What languages do you use these days? :)
 
What languages do you use these days? :)

I mainly use PHP, Java and C# these days, nothing so cool but generates cash for me :D . What do you use? Do you need to do programming being a moderator?
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Not usually.

I use C, C++ and Java, but I'm still in University so I haven't seen what professional projects look like.
 
Supporting Business
Discord Voice
Poképedia
Who did this to my freakin' car!
Dat Boi
Dolan Duck
Dolan Trump
I'm LAAAAAAAME
Live Free or Die
Mew
Mewtwo
PHP Shit Show 2k26
Poké Prizebox
Rust Player
Sythe Awards 2016 Winner
Sythe Awards 2017 Winner
Sythe Awards 2019 Winner
Tier 3 Prizebox
Toast Wallet User
Nope I am not joking. C is surpassed by most other languages nowadays mainly because of lower productivity.

http://langpop.com/

Most compilers, operating systems, applications and video games are still written in C/C++.

I would venture as far as to say if you don't know c++ you are unlikely to get a programming job in most cases.
 
could u do a java exam? :)
 
Looks nice, any change you could make a tutorial on how to make a simple 3d game in c++ using win32 api? I love to see a tutorial about that :D
 
did it all mentally while doing homework so it may be wrong. haven't used C in a while.
1) print hello world
2) infinitely
3) recurse infinitely
4) it creates infinitely many processes
5) cause a segmentation fault
6) char a[10]; int b = 5; a = 5;
? 7) void * (** foo)(void); yes
? 8) 9
? 9) compiler-dependent. depends on ambiguous operator precedence of postfix and prefix operators ++ and +
 
to say C is obsolete is like saying language is an obsolete form of communication.

it is what drives the entire online world, essentially.
 
Q1: Yes
Q2: Infinitely.
Q3: Infinite loop
Q4: Fork bomb
Q5: The if statement is just a regular statement in disguise. After this, the code block prints out the value assigned to *'z' (8).
Q6: Sets the 5th index of a[] to 5.
Q7: It's a function pointer to another function pointer type.
Q8: 011 (9)
Q9: Either 2 or 3 depending on the compiler.

;)
 
Back
Top