Showing posts with label c. Show all posts
Showing posts with label c. Show all posts

Wednesday, 12 October 2011

HOW TO CRACK CODING INTERVIEW.....!!!!

Before you start coding

  • Make sure you understand the problem. Don’t hesitate to ask questions. Specifically, if any of the problem requirements seem loosely defined or otherwise unclear, ask your interviewer to make things more concrete. There is no penalty for asking for clarifications, and you don’t want to miss a key requirement or proceed on unfounded assumptions.
  • Work through simple examples. This can be useful both before you begin and after you’ve finished coding. Working through simple examples before coding can give you additional clarity on the nature of the problem — it may help you notice additional cases or patterns in the problem.
  • Make a plan. Be wary of jumping into code without thinking about your program’s high-level structure. You don’t have to work out every last detail (this can be difficult for more meaty problems), but you should give the matter sufficient thought. Without proper planning, you may be forced to waste your limited time reworking significant parts of your program.
  • Choose a language. At Palantir, we don’t care what languages you know as long as you have a firm grasp on the fundamentals (decomposition, object-oriented design, etc.). That said, you need to be able to communicate with your interviewer, so choose something that both of you can understand. In general, it’s easier for us if you use Java or C++, but we’ll try to accommodate other languages. If all else fails, devise your own pseudo-code. Just make sure it’s precise (i.e.

Tuesday, 11 October 2011

Top 50 Questions of Basic C programming Asked in Interviews

Hey friends these are the top 50 basic C programming questions , I advise you all be prepare all these question before appearing for an interview.
  1. Write a program to print numbers from 1 to 100 without using loops
  2. Write a C program to swap two variables without using a temporary variable.
  3. What is the 8 queens problem? Write a C program to solve it?
  4. Write a C program to print a square matrix helically.
  5. Write a C program to reverse a string.
  6. Write a C program to reverse the words in a sentence in place.
  7. Write a C program generate permutations.
  8. Write a C program for calculating the factorial of a number.
  9. Write a C program to calculate pow(x,n)?
  10. Write a C program which does wildcard pattern matching algorithm.
  11. How do you calculate the maximum sub array of a list of numbers?
  12. How to generate fibonacci numbers? How to find out if a given number is a Fibonacci number or not? Write C programs to do both.