interview-questions

what is Psychic window in relation to VC++ ?

Hi, I saw above question in http://www.geekinterview.com/question_details/67202 Then i searched in Google, got below links. http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/470448e8-546f-4f5a-82b1-abbafe64b856 http://forums.windowsforum.org/index.php?showtopic=28783 I had some fun :D but no answer. Is there anyth...

Interview Question-Concatenate two Strings without using strcat in C

Recently I attended an interview where they asked me to write a C program to concatenate two strings without using strcat(), strlen() and strcmp() and that function should not exceed two (2) lines. I know how to concatenate two strings without using strcat(). But my method has nearly 15 lines. I dont know how to write it in two lines. ...

What are the different ways of performing sorting in java

This question was asked in an interview . Except Collections.sort() what are the other methods . ...

Clarifying questions in testing interview

Hi, Should I ask questions to interviewer to fully understand the functional and non-funtional requirements of a product if interviewer asks me to test that product and does not specify any other detail? For example, if interviwer asks me to test a Search Button – should I ask the following questions: How fast the user should be able ...

Removal of every 'kth' person from a circle. Find the last remaining person.

As part of a recent job application I was asked to code a solution to this problem. Given, n = number of people standing in a circle. k = number of people to count over each time Each person is given a unique (incrementing) id. Starting with the first person (the lowest id), they begin counting from 1 to k. The person at k is t...

Given two arrays a and b .Find all pairs of elements (a1,b1) such that a1 belongs to Array A and b1 belongs to Array B whose sum a1+b1 = k .

I am looking for the solution of following algorithm with minimal time and space complexity. Given two arrays a and b, find all pairs of elements (a1,b1) such that a1 belongs to Array A and b1 belongs to Array B whose sum a1+b1 = k (any integer). I was able to come up with O(n log n) approach where we will sort one of the array say...

Are questions about video-games valid interview questions (and does anyone actually use them)?

In a recent discussion with a group of like minded software developers, we realized that, amongst other things, we all shared a similar depth of knowledge when it comes to video-games - both in terms of judging quality, and in terms of awareness of the landscape. While we may not agree on our own personal favorites, we were incredibly co...

Interview Question: What is Lambda expression?

I have had recently two telephone interviews. In both of them I have been asked what is Lambda expression as the last question. Well I said that Lambda expression is an unnamed method in place of a delegate. But somehow that wasn't enough. I find it very hard to explain this precisely on a telephone interview. Does anyone know bet...

Interview Question: Reverse pairs

I got this for my interview: Numbers are said to be "reverse ordered" if N[i] > N[j] for i < j. For example, in a list: 3 4 1 6 7 3, the reverse ordered items are (3,1) (4,1) (4,3) (6,3) (7,3). How to get the number of pairs of reverse ordered items in O(nlogn) time. ...

Interview Hello World question

This classic ioccc entry is a hello world program written in c. Can anyone please provide an explanation of how it works? Original code (syntax highlighting intentionally missing): int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\ o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);} Slightly cleaner: int i; main...

How can a compiler differentiate between static data members having same name in different classes in C++?

I had a C++ interview recently where I was asked, how does the compiler differentiate static data members having the same name in two different classes? Since all static data variables are stored in the data segment, there has to be a way by which the compiler keeps track of which static data belongs to which class especially when they...

Doubt on a C++ interview question

I have read Answers to C++ interview questions among which there is one that puzzles me: Q: When are temporary variables created by C++ compiler? A: Provided that function parameter is a "const reference", compiler generates temporary variable in following 2 ways. a) The actual argument is the correct type, but it isn't Lv...

A Question about C++ / OOD Interview Questions

What is the most interesting or difficult question asked to you during an C++/OOD interview? What is the most interesting or difficult question you like to ask to a candidate during a C++/OOD interview? Edit: Updated the misleading Title Edit: Ofcourse: 1. When you are the one being interviewed. 2. When you are intervieweing so...

Google Product Manager Interview Preparation, To the point

Hi, I have an interview for a product manager position at Google, I am a 4+ years of Experience Software Developer and an IT Entrepreneur having a start up. I am currently preparing for the interview, after googling around, I found that I will be asked in Product Management/Design, Problem Solving (Brain Teasers), some were asked tech...

Is this a good interview questions to be asked in interview for a software tester?

Hi, I normally ask this question in a interview for tester. Our software is really complex, has GUI and backend component. We require the tester to be good in analytical and can think out of the box. In this context, is the following question good to be asked or is it too complex/bad/ugly? Also our requirement is that the tester should b...

first n digits of an exponentiation

How do i determine the first n digits of an exponentiation (ab). eg: for a = 12, b = 13 & n = 4, the first 4 digits are 1069. ...

After malloc, how to obtain more memory that is still continuous?

This is an interview question. If you use malloc to get a piece of memory, such as: char *p = (char *) malloc (100); Now you find you need more memory, say 130. How to obtain the memory such that the new piece of memory is still continuous ...

How will you keep a specific country on top in a drop down list?

In a list of countries that need to be displayed in an alphabetical order, you need to place United States at the top of the list. How will do you this? I answered by saying that I will have a table structure in such a way that the US is at id-0. The rest of the countries are listed in their alphabetical order. So when I fetch from the...

How will you process date values stored in varchar fields?

Your user wants a report sorted by date. This report is being created using C# and ODP.NET You do a sort on the Date column and the output is not exactly what the user expected. Upon some closer inspection, you find that the date column is a varchar2 field. The values in the column are stored in DD-MON-YY "01-JAN-10" format. How will ...

How will you fetch static data in your windows form application?

What's your approach to fetch static data in your windows form application? My approach is to load an arrayList with data when the user logs in. Then reuse this arraylist which will save round trips to the database. This means if you add something to static data, (a rare occasion), you will have to exit your windows forms application a...