Interview Question on .NET Threading
Could you describe two methods of synchronizing multi-threaded write access performed on a class member? Please could any one help me what is this meant to do and what is the right answer. ...
Could you describe two methods of synchronizing multi-threaded write access performed on a class member? Please could any one help me what is this meant to do and what is the right answer. ...
I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question and so in the same spirit, I am asking this question for JavaScript Developer. What questions do you think should a good JavaScript programmer be able to respond to? EDIT : I am markin...
I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question and so in the same spirit, I am asking this question for Database/SQL Developer. What questions do you think should a good Database/SQL programmer be able to respond to? EDIT : I am ma...
#include <stdio.h> int main(void){ unsigned a[3][4] = { {2,23,6,7}, {8,5,1,4}, {12,15,3,9} }; printf("%u",*((int*)(((char*)a)+4))); return 0; } The output in my machine is the value at a[0][1] i.e 23.Could somebody explain how is this working ? Edit: Rolling Back to old yucky code,exactly what was presented to me :P ...
You are given an integer 51234 (say) we need to sort the digits of a number the output will be 12345. How to do it without using array ? ...
I'm a junior c# web developer preparing for my first interview. What kinds of things/topics should I be expected to know? ...
Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7). I tried it using all possible allowed sums and then fin...
By "web UI developer", I mean someone whose primary job is to craft pages using HTML, CSS and JavaScript. They should probably be able to learn enough PHP or Rails or something to get by when creating pages that draw their information from a more sophisticated back-end, e.g., <div>Your <?=$subscription['title']?> Subscription</div> Th...
int x[10],y[10]; x = y; I am thinking of a simple hack, which would enable me to get this effect. ...
For example, given a str of "Stackoverflow is for every one" and remove of "aeiou", the function should transform str to "Stckvrflw s fr vry n". I have one char array of string: str[] and one char array of chars to be removed:remove[] My Solution: Loop str[] looking for each in character in remove[]. Shift str[] one place left every-t...
Given two sorted linked lists, L1 and L2, a solution to compute their intersection L1 intersection L2. ...
For example, given string "abc fghi bc kl abcd lkm abcdefg", the function should return string "abcd" and the count of 2. A O(n^2) solution seems easy but I am looking for a better solution. Edited: If nothing better than O(n^2) is possible than which approach would be best performance wise. ...
Hi, I was asked in an interview,a question from oracle sql.this seemed to be a simple question but i had no clue to answer.could anybody help? if there is string like "newyork is a beautiful city" in a colum. select column_name from table_name; will result newyork is a beautiful city what is the query required to give the output...
I need to write a function to convert big endian to little endian in C. I can not use any library function. ...
I saw this question in one of the C puzzles!! Is this really possible? How can I call a function, given its name as a string? is it possible to use string that is read with scanf be used directly to call a function? i already have thought of if(strcmp(str,"string"))then call the function. but is there any other approach? ...
I was recently interviewing for a C++ position, and I was asked how I guard against creating memory leaks. I know I didn't give a satisfactory answer to that question, so I'm throwing it to you guys. What are the best ways to guard against memory leaks? Thanks! ...
Given a linked list of T size , select first 2n nodes and delete first n nodes from them; Then do it for the next 2n nodes and so on... For example- Let's consider a linked list of size 7: `1->2->3->4->5->6->7` If n = 2, the desired output is : `1->2->5->6->7` I didn't understand what this problem is actually indicating.Could...
This was asked to me in an interview! i really got confused How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters could anybody please help? ...
I have just applied for a Java developer job and the recruiter told me he wanted me to take an online Java test to see how my Java knowledge was. Fact questions with multiple answers. Does anyone have idea what site it could be? Tips on what should i prepare? -- So, i got to make this test: Java 2 - Non-GUI Which consisted of questi...
Hi guys, I found this on the internet. It looks good an interview question. I guess I got the working correct but programatically I haven't tried it. SmallestInt You are given an integer n. Return the smallest integer greater than or equal to n that contains exactly k distinct digits in decimal notation. Definition ...