Friday, August 31, 2007

Programming Questions-Set-II,Zephyrix'07

1. Assume your compiler doesn’t support modulo operation. Write a line of code to calculate the same?

2. Check whether the given no is a non zero integer without using the relational and arithmetic operators.

3. What is the output of the following code?
#define s(x) #s void main() { printf(s(The Boss)); }

4. Write a program to print all numbers i such that is in between 0 and n where i is divisible either by 4 or 5 but not both.

5. Write a C program to reverse a string without using the library functions.

6.Write a program to convert a decimal no into base 7.

7.Write a program that arranges an array of names in alphabetical order.

8. What is the difference between macro and inline functions?

9. Write a program to check if the sum of squares of the digits of a number is equal to the number itself.

10. Write a single line statement to initialize all elements on an array to 0 using a single assignment

11. Write a recursive function to find the nth term of the fibonacci series.

12. HAPPY NEW YEAR! You wake up to the screams that celebrate the entry of the new year. You turn around to look at your clock, but it seems to have stopped functioning properly. Instead of showing the time, it displays the seconds elapsed from midnight. You have to write a program to find the correct time for you.

13. The Illustrated Books Of African Animals has photos of various animals on the left side and the description of the animal on the right. Given a random page number, write a function to predict if the page has pictures or description. The first page contains the introduction describing the various geographics regions in the area.

14. You are the CEO of a company. You have under you ‘n’ employees directly under your supervision. The first among them has 1 person working under them, the second 2. . . and the nth one n people under him. You now have to write a program that calculates the total number of employees working in the company.

15. Vinu and Computer are playing a game. Both of them can choose any no. The no can be at least 1 and at most 8. To start with each player take turns alternatively until the total becomes exactly 25. The person who gives the last no loses the game. Both of them play intelligently to win the game. The computer gives the first no.
Write a C program so that the computer always wins the game.
Print an error message if the total goes beyond 25.

Monday, August 27, 2007

Programming Questions-Set-I,Zephyrix'07

1.Find whether the given no is even or odd without using conditional operator and conditional statements and math functions

2. Swap two given numbers without using a temporary variable and arithmetic operations

3.Evaluate the expression (a+b)(a-b) without using ‘+’ operator and math function

4. Write a program to display the following output:

*
**
***
****
*****

5.What is meant by dangling pointer?

6. Write a program to check whether the given no is prime no or not

7.Write a snippet to find the gcd of two given nos

8.Write a simple program to display the system time.

9. Convert a character from one case to the other.

10. Write a single line statement to initialize all elements on an array to 0 using a single assignment.

11. Write a recursive function to find the nth term of the fibonacci series.

12. The Illustrated Books Of African Animals has photos of various animals on the left side and the description of the animal on the right. Given a random page number, write a function to predict if the page has pictures or description. The first page contains the introduction describing the various geographics regions in the area.

13. The Schema Occult group celebrates a special function every four years with certain exceptions. This custom was started 1492. But due to some vague reasoning they did not celebrate it in the year 1500. You, being the Leader of this group has to take into account these factors and make the Master Computer find if the current year is fit to be celebrated.

14. You are a railways employee. Your job is to print the list of passengers to be stuck on the compartments. When the Rajdhani Express arrived at the station, you notice that the list you printed was wrong. The names in the list seemed garbled except for a couple of people. Those two people were ‘Healaeh’ and ‘Arora’. You have 5 minutes to write a program to sort out the error and print the correct list.

15. A king decides to execute 100 prisoners and arranges them in circular fashion. The first prisoner is given the sword. He kills next prisoner and passes the sword to the next prisoner and the process continues. You have to save two prisoners. Write a C program to find the two positions for the prisoners to be alive.

Saturday, August 25, 2007

Zephyrix'07 Uruvaana kathai.......

It all started one month ago. We have planned to conduct this as a Mega Event. Since we are in our final year we wanted to make it. Even when we were in our II year we contributed to our department symposium. But last year we were not allowed to involve in our symposium activities......Kaalgal kattappatta Ottap panthaya veeran pol irunthom.....But this year our Hod Mam gave full freedom......She handed over the responsibility of conducting the entire event to us.
We listed 10 events and we formed the respective committees.

The next step is to name the event. We wanted to change the name that was given for the past 6 years. The name must express softness. So we started thinking.........The word "breeze" came to our mind.....But it so common.......The equivalent word for breeze "Zephyr" is catching. We added suffix and framed "ZEPHYRIX'07" after having a long discussion. The other names that were suggested are "ARMAGEDDON", "FUZORZ".

The name "Zephyrix" does not express challenge. So while designing the poster we added the
"Rubik's Cube" which expresses the challenge. The poster and the logo were desingned by our GFX committee.

For getting sponsors we formed a team and they tried their level best. The next step is to prepare the questions for the events. All the event members were very much involved and interested in making this event a grand success. So all the event organisers worked hard and gave ideas to conduct it in a different manner. We got guidance from the ssn college passed out students sorry friends. Each and every part was properly planned. Mahesh,Mama,Vijay took the in charge of Dumb-C event. Raja,Boopathi have taken care of the Ad-Zap event. Babbu and Samba were the organisers of the Quiz event. Me and Dhadi took the in charge of conducting the Debugging and the Programming event. Siddhu took care of the Gamming Event.

All of us had only one thing in our mind. That is this event must create a record in the history of Sairam. We set a target of 800 participants. Boopu gave ideas for the presentation. Each and every part of the event has been properly planned and arranged accordingly. Ramanathan took in charge of the printing work. Even the id cards were printed in a different manner. Myself and mahesh started marketing in orkut. All of us changed our profile name and photo.

Even the day before the event all the students were busy in their work. Many unforgettable incidents happened which i don't want to explain. Eventhough the organisers of Zephyrix'07 were working hard to make it as a mega event. This was the only thing in our mind for the past one month.

Tuesday, August 21, 2007

Answers to Cine Quiz #1

1. Billa Pada Poojai (Look at Ajith wearing Suit)

2.The Kavignar is Mu. Metha. He is the lyricist for the song "Gundu gundu gundu pennae.........." from Dhool

3.The personality is Editor B.Lenin.

He is the son of Director Bhimsingh

He is the editor for the movies 'Nayakan' and 'Jeans'

So the ans is choice d)


4. Na.Muthukumar

5.The song was sung by Chitra.........but the ans is Harini



Mahesh -0
Raja-0
Rajesh-1
Samba-1
Ganesh-1
Bala-0

Friday, August 10, 2007

Cine Quiz #1

Send your answers to mailtosano@gmail.com.



1. Identify the occation/special event?



2. Identify the personality


This lyricst is a good Tamil kavignar and he worked as a professor for more than 30 years at presidency college, chennai. He refused to write songs with abaasa varigal. He wrote a song in dhool

3.Which of the following about this person is/are correct?



i. His father is a famous director


ii. He has written more than 100 songs


iii.He worked with both maniratnam and shankar


a). i only b). ii only c). iii only d). more than one e). none of these



4.Who wrote the song "Vepamaram puliyamaram..." from the movie samy?




5. The song "Enge enathu kavithai...... " from Kandukonden....Kandukonden was about to sung by some other singer. Name the pesonality?

Thursday, August 02, 2007