Sementica @ Pecfest 5  

Posted by Unknown in ,

As I said in one of the previous posts, Pecfest was not standardized. And this came out eminent this time. We came there for a programming contest after a standard prelim( Same old C++ trick questions, with some new lessons to learn, like printf("%%%%%"); a=(1,2,3,4,5); intellient use of i=050; j=0x50; with <<,>>,|,&, operators, recursive main and all). The expectations had risen for an intensive programming contest. We had been second in the prelims with a lots of mistakes, and a local 4th yr. team coming first, par again chalta hai. What came up is much different to expectations, not really bad but missed us a chance to have had another rivetting programming contest just the next day to the ICPC online.
Questions:
1. Syntax of printf: The return type was the trick.
2. Declare an array of pointers to function, that return a pointer to function returning a pointer to character.... Confused, that's ABC of code obfuscation. Mr. Vishnu, one of my seniors had taught this to us, though we had not taken it seriously as it seemed out of scope.
3. To find the sizeof() of int without the sizeof() operator: same old use of pointer++ or array elements, typecast to int and subtract.
4. We were to compart two function declarations, int func(int *arr[]); and int func(int *arr[3]);. we never expected a difference as nothing like this mattered in the protype and the pointer to be passed was to be the same type and rest depend on what we passed. I don't know ehether I was correct but what I tried and just said, seem to work.
5. Analog clock via Turbo C graphics--- who does it now- no one attempted this question, though the organizer was disappointed with that.
5. Given the width and length, egenrate a box of 0s and 1s and count maximum the number of 0s in the biggets rectangle you code make up- one proper coding question, but time had it on all teams as we managed the generator correct.


We ended up as the winners(I and Sourabh) just like th Google Doodle. Unlike google Doodle this efvent had a cash prize of Rs. 500, though that could just meet up our TA, food and all.

This entry was posted on Monday, November 10, 2008 at Monday, November 10, 2008 and is filed under , . You can follow any responses to this entry through the comments feed .

0 comments

Post a Comment