Java Interview Questions - 2

Tuesday, March 18, 2008

  • Suppose if we have variable ‘I’ in run method, if I can create one or more thread each thread will occupy separate copy or same variable will be shared?
  • Tell some latest versions in JAVA related areas?
  • What are JVM.JRE, J2EE, JNI?
  • What are Normalization Rules? Define Normalization?
  • What are abstract classes?
  • What are adapter classes?
  • What are advantages of java over C++?
  • What are benefits if Swing over AWT?
  • What are byte codes?
  • What are files generated after using IDL to java compiler?
  • What are session variable in servlets?
  • What are statements in Java?
  • What are streams?
  • What are swing components?
  • What are traverses in binary tree?
  • What are virtual functions?
  • What do you know about garbage collector?
  • What do you mean by light weight and heavy weight components?
  • What do you mean by multithreading?
  • What is JAR file?
  • What is JFC?
  • What is JNI?
  • What is base class for all swing components?
  • What is client server computing?
  • What is constructor and virtual function? Can we call virtual function in constructor?
  • What is corresponding layout for card in swing?
  • What is difference abstract class and interface?
  • What is exact difference in between Unicast and Multicast object? Where will it be used?
  • What is functionability stubs and skeletons?
  • What is functionality of stub?
  • What is interface?
  • What is layout for toolbar?
  • What is light weight component?
  • What is main functionality of Prepared Statement?
  • What is main functionality of remote reference layer?
  • What is mapping mechanism used by java to identify IDL language?
  • What is middleware? What is functionality of web server?
  • What is polymorphism?
  • What is protocol used by server and client?
  • What is role of Web Server?
  • What is root class for all java classes?
  • What is serializable interface?
  • What is serialization?
  • What is thread?
  • What is update method called?
  • What is use of interface?
  • What is user defined exception?
  • When will you use interface and abstract class?
  • Where are card layouts used?
  • Why do we use oops concepts? What is its advantage?
  • Why do you canvas?
  • Why does java not support multiple inheritance?
  • Why is java not fully objective oriented?
  • Why is java not pure oops?
  • Why java is considered as platform independent?
  • Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
  • Write down how will you create Binary tree?
  • Write program for recursive traverse?
  • what is meant wrapper classes?

Read more...

Java Interview Questions - 1

  • Can you load server object dynamically? If so what are 3 major steps involved in it?
  • Can you run product development on all operating systems?
  • Considering notepad/IE or any other thing as process, What will happen if you start notepad or IE 3 times ? Where three processes are started or three threads are started?
  • Difference : AWT and Swing?
  • Difference : Abstract class and Interface?
  • Difference : Grid and Gridbaglayout?
  • Difference : Process and Thread?
  • Difference : java and c++?
  • Difference : process and threads?
  • Does java support function overloading, pointers, structures, unions or linked lists?
  • Does java support multiple inheritance? if not, what is solution?
  • Explain 2-tier and 3-tier architecture?
  • Explain about version control?
  • Have you ever used HashTable and Directory?
  • How can two threads be made to communicate with each other?
  • How can we do validation of fields in project?
  • How can you know about drivers and database information ?
  • How do you download stubs from Remote place?
  • How does thread synchronization occur in monitor?
  • How java can be connected to database?
  • How will you add panel to frame?
  • I want to store more than objects in remote server? Which methodology will follow?
  • In container there are 5 components. I want to display all component names, how will you do that?
  • In htm form I have button which makes us to open another page in seconds. How will you do that?
  • In htm page form I have one button which makes us to open new page in seconds. How will you do that?
  • Is there any tag in htm to upload and download files?
  • Meaning of Servelet? What are parameters of service method?
  • Meaning of Session? Explain something about HTTP Session Class?
  • Meaning of Static query and Dynamic query?
  • Meaning of class loader? How many types are there? When will we use them?
  • Meaning of cookies? Explain main features?
  • Meaning of distributed application? Why are we using that in our application?
  • Meaning of flickering?
  • Meaning of function overloading and function overriding?

Read more...

C Interview Questions - 8

  • What is the output of printf("%d")
  • What will happen if I say delete this
  • What is Dangling pointer?
  • Difference between "C structure" and "C++ structure".
  • Diffrence between a "assignment operator" and a "copy constructor"
  • What is the difference between "overloading" and "overridding"?
  • Explain the need for "Virtual Destructor".
  • Can we have "Virtual Constructors"?
  • What are the different types of polymorphism?
  • What are Virtual Functions? How to implement virtual functions in "C"
  • What are the different types of Storage classes?
  • What is Namespace?
  • What are the types of STL containers?.
  • Is there any difference between a messageand method?
  • If I ask you to write 'VI' editor in C++ - How you'll proceed?
  • Difference between char name[] = “mindgrill q”; and char *name = “mindgrill q”;
  • Should we use global variables?
  • Parsing HTML or XML document with C++
  • What is 'self assignment'?
  • Difference between how virtual and non-virtual member functions are called
  • Finding shortest path aka Dijkstra's algorithm and backtracking
  • Doing permutations and combinations in C++
  • Difference between "vector" and "array"?
  • How to write a program such that it will delete itself after exectution?
  • Can we generate a C++ source code from the binary file?
  • What are inline functions?
  • Talk sometiming about profiling?
  • How many lines of code you have written for a single program?
  • What is "strstream" ?
  • How to write Multithreaded applications using C++?
  • Explain "passing by value", "passing by pointer" and "passing by reference"
  • Write any small program that will compile in "C" but not in "C++"
  • Have you heard of "mutable" keyword?
  • What is a "RTTI"?
  • Is there something that I can do in C and not in C++?
  • Why preincrement operator is faster than postincrement?
  • What is the difference between "calloc" and "malloc"?
  • What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?
  • What is Memory Alignment?
  • Explain working of printf.
  • Difference between "printf" and "sprintf".
  • What is "map" in STL?
  • When shall I use Multiple Inheritance?
  • What are the techniques you use for debugging?
  • How to reduce a final size of executable?
  • Give 2 examples of a code optimization.

Read more...

C Interview Questions - 7

  • What is linklist and why do we use it when we have arrays? - I feel correct answer should be linklist is used in cases where you don’t know memory required to store data structure and need to allocate is dynamically on demand.
  • What is maximum combined length of command line arguments including space between adjacent arguments?
  • What is near, far and huge pointers? How many bytes are occupied by them?
  • What is object file? How can you access object file?
  • What is pointer?
  • What is recursion?
  • What is similarity between Structure, Union and enumeration?
  • What is static identifier?
  • What is structure?
  • What is use of typedef?
  • When reallocating memory if any other pointers point into same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
  • Where are auto variables stored?
  • Where does global, static, local, register variables, free memory and C Program instructions get stored?
  • Write down equivalent pointer expression for referring same element a[i][j][k][l]?
  • advantages of using pointers in program?
  • advantages of using typedef in program?
  • bit fields? What is use of bit fields in Structure declaration?
  • declare following:
    array of three pointers to chars,
    array of three char pointers,
    pointer to array of three chars,
    pointer to function that receives int pointer and returns float pointer,
    pointer to function that receives nothing and returns nothing
  • detect loop in linked list?
  • differences between malloc() and calloc()?
  • differences between structures and arrays?
  • different storage classes in C?
  • dynamically allocate one-dimensional and two-dimensional array of integers?
  • enumerations?
  • implement substr() function that extracts sub string from given string?
  • macros? advantages and disadvantages?
  • obtain current time and Difference : two times?
  • obtain segment and offset addresses from far address of memory location?
  • print string on printer?
  • register variables? advantage of using register variables?
  • that function should be used to free memory allocated by calloc()?
  • that header file should you include if you are to develop function that can accept variable number of arguments?

Read more...

C Interview Questions - 6

  • How can called function determine number of arguments that have been passed to it?
  • How can we check whether contents of two structure variables are same or not?
  • How can we read/write Structures from/to data files?
  • How much maximum can you allocate in single call to malloc()?
  • How will you declare array of three function pointers where each function receives two ints and returns float?
  • If we want that any wildcard characters in command line arguments should be appropriately expanded, are we required to make any special provision? If yes, that?
  • In header file whether functions are declared or defined?
  • In header files whether functions are declared or defined?
  • Increase size of dynamically allocated array?
  • Increase size of statically allocated array?
  • Out of fgets() and gets() that function is safe to use and why?
  • Program : compare two strings without using strcmp() function.
  • Program : concatenate two strings.
  • Program : find Factorial of number.
  • Program : generate Fibonacci Series?
  • Program : interchange variables without using third one.
  • Program : s for String Reversal. same for Palindrome check.
  • Program : that employs Recursion?
  • Program : that uses command line arguments.
  • Program : that uses functions like strcmp(), strcpy(), etc.
  • To that numbering system can binary number be easily converted to?
  • Use bsearch() function to search name stored in array of pointers to string?
  • Use functions fseek(), freed(), fwrite() and ftell()?
  • Use functions memcpy(), memset(), memmove()?
  • Use functions randomize() and random()?
  • Use functions sin(), pow(), sqrt()?
  • Use qsort() function to sort array of structures?
  • Use qsort() function to sort name stored in array of pointers to string?
  • What advantages of using Unions?
  • What do functions atoi(), itoa() and gcvt() do?
  • What do ‘c’ and ‘v’ in argc and argv stand for?
  • What does error ‘Null Pointer Assignment’ mean and what causes this error?
  • What does static variable mean?
  • What is NULL Macro? Difference : NULL Pointer and NULL Macro?
  • What is NULL Pointer? Whether it is same as uninitialized pointer?
  • What is far pointer? where we use it?

Read more...

C Interview Questions - 5

  • Are expressions arr and *arr same for array of integers?
  • Are variables argc and argv are local to main?
  • Bitwise operator for checking whether particular bit is on or off?
  • Bitwise operator for putting on particular bit in number?
  • Bitwise operator for turning off particular bit in number?
  • Can Structure contain Pointer to itself?
  • Can there be at least some solution to determine number of arguments passed to variable argument list function?
  • Can we specify variable field width in scanf() format string? If possible how?
  • Can you dynamically allocate arrays in expanded memory?
  • Can you use function fprintf() to display output on screen?
  • Can you write function similar to printf()?
  • Describe about storage allocation and scope of global, extern, static, local and register variables?
  • Difference : Strings and Arrays?
  • Difference : Structure and Unions?
  • Difference : arrays and linked list?
  • Difference : enumeration and set of pre-processor # defines?
  • Difference : functions memmove() and memcpy()?
  • Difference : functions rand(), random(), srand() and randomize()?
  • Difference : main() in C and main() in C++?
  • Difference : pass by reference and pass by value?
  • Difference : strdup and strcpy?
  • Differentiate between for loop and while loop? it uses?
  • Does mentioning array name gives base address in all contexts?
  • Does there exist any other function that can be used to convert integer or float to string?
  • Does there exist any way to make command line arguments available to other functions without passing them as arguments to function?
  • Explain one method to process entire string as one unit?
  • How are Structure passing and returning implemented by complier?

Read more...

Visual Basic Questions

  • What are the components in a standard VB project?
  • Describe Object, Property, Method & event
  • Describe form’s lifecycle (Sequence of events)
  • Variable Declaration
    Difference in
    Dim x as integer,
    Dim y as integer,
    &
    Dim x, y, z as integer
  • Difference in Standard module & Class module
  • What are different data types available in VB
  • What are the type of procedures available in VB
  • Looping constructs in VB
  • Write a statement which converts string to date
  • What are various controls that you know in VB
  • What control would you choose if you have multiple options & you can select only one option
  • Difference between combo box & List box
  • Which is better Image Box / Picture Box
  • Name windows common controls that you know
  • How can you add or remove control at run time
  • What are databases accessible to VB
  • Describe in detail , how we connect to database
  • What are the different type of recordsets
  • Difference between DAO & RDO
  • What is transaction processing . How do we do it in VB

Read more...

Visual Basic Objective Question Paper

1. A VB Project (.vbp) consists of forms, code modules and (Chose one or more than one)
A. Custom controls
B. Database
C. Environment settings
D. PL/SQL procedures

2. When an object is created it is assigned a default name based on its object type?
A. True
B. False

3. What all we can call within the VB Program? (Chose one or more than one)
A. Exe
B. Dll
C. Cls
D. None of the above

4. We can manage release version through VB?
A. true
B. false

5. What controls can be placed on VB MDI Form?
A. timer control
B. command button
C. text box
D. picture box

6. Sequence of events in form loading?
A. Initialize Load Resize Activate GotFocus Paint
B. Load Initialize Activate Resize GotFocus Paint
C. GotFocus Initialize Paint Resize Load Activate
D. Activate Initialize Paint Load Resize GotFocus


7. Which statement is true?
A. exe can run independently
B. dll can run independently
C. exe and dll both can run independently
D. none of the above

8. Which of the following statement(s) is/are true
A. Declaration of Option Explicit is mandatory
B. If we define option explicit, then declaration of variables is must
C. If we define option explicit, then declaration of variables is not required


9. What will be the output of the following program

Private Sub Command1_Click()
a=10
On Error GoTo myLabel
b = a / 0
MsgBox (b)

myLabel:
Resume Next
End Sub
A. Program will give compilation error
B. program will run and show blank message box
C. program will not run at all
D. 10/0 will be shown in the message box


10. Which of the following is/are not a valid type(s) of recordset?
A. Table-type
B. Dynaset-type
C. Dynamic-type
D. Cursor-Type


11. What are the objects of ADO?
A. Command
B. Connection
C. Recordset
D. Database


12. Which of the following is/are faster?
A. Inprocess
B. Out of Process
C. DLL
D. EXE


13. What is a bookmark?
A. Variant
B. Integer
C. It uniquely identifies a particular column in a database
D. It uniquely identifies a particular row in a database


14. We need separate ODBC drivers for each database type?
A. true
B. false


15. What will be the output of the following program? (Assuming end_date as 18th March 2008)
Private Sub Command1_Click()
Dim start_date As Date
Dim end_date As Date
Dim NoOfDays As Integer

NoOfDays = 0
start_date = "01/01/2008"
end_date = Date

While (start_date <> "SUNDAY" And UCase(WeekdayName(Weekday(start_date))) <> "SATURDAY") Then
NoOfDays = NoOfDays + 1
End If
start_date = start_date + 1
Wend
MsgBox (NoOfDays)
End Sub
A. 55
B. 56
C. 54
D. 57


Read more...

Chitika

About This Blog

Followers

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP