Popular Posts

Wednesday 7 March 2012

Interview Question - Programming General

Interview Question - Programming General
This is the collection of Interview Question Answers for fresher, Trainee programmer, software engineer. This Interview question are not specific to any programming language. This type of interview question are asked to the fishers, Trainee software Engineer to judge their logics, Programming Technique and IQ level.

Prepare for this programming general and IQ, Aptitude, and Programming Technique are tough, there is no predefined syllabus for this Interview question and answers, I have collected this set of Interview question and answers from different top IT Company in India. If you have any question and answers to share, send to me. I will share it to others.

 

































 
1.
What is VSS (Visual Source Safe) ?
 
You can use VSS to secure code access among the developer and make control over the access right, also can check for multiple version of code.
 
2.
Assume you have an array that contains a number of strings (perhaps char * a[100]). Each string is a word from the dictionary. Your task, described in high-level terms, is to devise a way to determine and display all of the anagrams within the array (two words are anagrams if they contain the same characters; for example, tales and slate are anagrams.)
 
Begin by sorting each element in the array in alphabetical order. So, if one element of your array was slate, it would be rearranged to form aelst (use some mechanism to know that the particular instance of aelst maps to slate). At this point, you slate and tales would be identical: aelst.
Next, sort the entire array of these modified dictionary words. Now, all of the anagrams are grouped together. Finally, step through the array and display duplicate terms, mapping the sorted letters (aelst) back to the word (slate or tales).
 
3.
What is the difference between a NULL pointer and a void pointer?
 
A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer to an object of an unknown type, and is guaranteed to have enough bits to hold a pointer to any object. A void pointer is not guaranteed to have enough bits to point to a function (though in general practice it does)
 
4.
What is encapsulation technique?
 
Hiding data within the class and making it available only through the methods. This technique is used to protect your class against accidental changes to fields, which might leave the class in an inconsistent state.
 
5.
Definition of Object Oriented Programming in single line?
 
Object oriented programming is a programming paradigm which  uses objects and its interactions to design applications  and computer programs.
 
6.
What is virtual function?
 
The virtual keyword means that method, property or function can be overridden
 
7.
What’s a Windows process?
 
It’s an application that’s running and had been allocated memory.
 
8.
What is programming?
 
Computer programming is writing or editing a computer program. A computer program is a set of instructions which determine how the computer will react to input when that program is running.
 
9.
What is a debugger?
 
debugger is a program in which you run another program that you are trying to debug. Inside a debugger, you can step through your program one line or instruction at a time, set break points and have your program run until it hits one, examine the contents of variables and memory, and such other useful things as that.
 
10.
what is a Programming language?
 
A programming language is a stylized communication technique intended to be used for controlling the behavior of a machine (often a computer). Like human languages programming languages have syntactic and semantic rules used to define meaning.
 
11. What's the difference between a programming language, a scripting language?
  The main difference between a "programming language" (C, C++ etc.) and a "scripting language" (ASP, JSP, JavaScript, VBScript) is that code written in a programming language needs to be compiled before it is run. Once it is compiled, it can be run any number of times.

Scripting languages, on the other hand, are interpreted at run-time. This means that every time you want to run the program, a separate program needs to read the code, interpret it, and then follow the instructions in the code. Compiled code has already been interpreted into machine language, so it is will typically execute faster because the conversion into machine language has already been done.

No comments:

Post a Comment