If this blog helped you in any way, please donate a dollar here

Showing posts with label Contest. Show all posts
Showing posts with label Contest. Show all posts

Saturday, July 27, 2019

The Techgig C Skill Test

I used to consider myself to be pretty good in C, so I decided to try out the world's biggest programming contest platform, TechGiG (Look here: https://www.techgig.com), or so they claim to be. I wonder why I hadn't dabbled in this platform all this years since the platform seems to be existing for quite some time now. I do remember some 5-6 years ago I had dabbled a bit in the website and then stopped, I wonder why, can't really recall.

So I decided to give it a spin. I decided to try out the TechGig Skill test. Here's what I found while attempting the test.

There were 25 questions and I got 6 wrong and 19 correct. I wonder which ones I got wrong. Also considering some multiple choice answers didn't really answer the question. Also, I really wonder what a Java Question was doing in a C Skill test! Take a look:


Being the Java n00b, I might have messed that up. Moving on to one of the brilliant CHTML Questions in recent times.


That's an amazing blend of HTML and C. Amazing HTML coding skills are the feature of the tests in TechGig, since this sort of goof-up is pretty common.

Let's move on to the wrong answers now. I got this wrong apparently:


Well, I do pride myself in such questions, but seems like I have forgotten how printf handles the parse string! Well, what does ideone think?


Dear! O Dear! Ideone might have got it wrong too! Wait, maybe TechGig was wrong? Dare I say that!

Let's move to the next incorrect answer by me. Here we go:


Well, well, well. Seems like I've forgotten the basics of pointers! :( What does ideone think then ?


I think I've caught on by this point. I'm quite a C n00b also. Shall we see the next incorrect answer by me ?


This was quite tricky, so it's possible I might have messed up here. But really ?


By this point I'm convinced that the compiler used by ideone is perhaps broken. Or maybe it's TechGig that sucks?

I'll leave it to you, the reader to figure that out.

Thursday, September 23, 2010

Obfuscated Code Contest

Obfuscation is an art. It refers to making your code hard to read... hard to understand using advanced concepts. So, let me present a code that prints my name, but in an obfuscated manner! This was done by me a couple of years ago, but was faulty. I corrected it and here it is:

float m[] = {2.94576846098867283087373218349056E+32, 3.761396E+24, 9.316795E-39 };
main(){printf(m);}

Magic eh? Nope... just an understanding of data types.

The concept here is pretty simple. Data representation is exploited. Don't think IEEE754 here, since this can be made with a simpler technique. So.. let me ask my readers... what technique can be used to generate the number?

I am giving away a prize for the person who answers this first and correctly. Best of Luck!

Wednesday, April 14, 2010

Tech Fests Win and Loss

National Institute of Technology aka R.E. College of Durgapur was famous for being the college second only to IIT Kharagpur in West Bengal in Engineering Education. This was not what I had expected of them.

The prelims questions were so bad that we (me and Sarthak) could challenge them that they knew nothing about them They were mostly wrong. All of them used the depreciated C90 standard and the TurboC standard (sic!). In the 2 events of programming : Khula Maidan and Code Marauders, I qualified in only Code Marauders. In Khula Maidan, I did not qualify. So, I wasn't good enough? Mine and Sarthak's teams did not qualify, we challenged them that the scripts were checked wrongly and questions posed erroneous. After much persuasion, they found Sarthak's paper and qualified them. And they didn't find our paper. We were notified we did not make the cut-off make necessary.