Tuesday, 7 February 2012

Memory Hierarchy


  • Registers


—   In CPU




  • Internal or Main memory


—   May include one or more levels of cache


—   “RAM”




  • External memory

Monday, 6 February 2012

Wrapper classes

Wrapper classes correspond to the primitive data types in the Java language. These classes represent the primitive values as objects. All the wrapper classes except Character have two constructors -- one that takes the primitive value and another that takes the String representation of the value. For instance:

Integer i1 = new Integer(50);
Integer i2 = new Integer("50");


The Character class constructor takes a char type element as an

Sunday, 5 February 2012

Which config file has all the supported channels/protocol ?

Machine.config file has all the supported channels and formatter supported by .NET remoting.Machine.config file can be found at “C:\WINDOWS\Microsoft.NET\Framework\vXXXXX\CONFIG” path. Find <system.runtime.remoting> element in the Machine.config file which has the channels and the formatters. Below is a figure shown which can give a clear idea of how the file looks like.

Note :- Interviewer will not ask you to name all channels and

Saturday, 4 February 2012

Frequently Asked Questions in Technical Round at MNCs like TCS, WIPRO, INFOSYS,..etc – 7

Predict the output or error(s) for the following:


1)

main ( )

{

 static char *s[ ]  = {“black”, “white”, “yellow”, “violet”};


 char **ptr[ ] = {s+3, s+2, s+1, s}, ***p;


 p = ptr;


 **++p;


 printf(“%s”,*--*++p + 3);


}

Answer:

ck


Explanation:

Friday, 3 February 2012

What is the easiest searching method to use?

Just as qsort() was the easiest sorting method, because it is part of the standard library, bsearch() is the easiest searching method to use.

Following is the prototype for bsearch():

void *bsearch(const void *key, const void *buf, size_t num, size_t size, int (*comp)(const void *, const void *));


The bsearch() function performs a binary search on an array of sorted data elements. A binary search is another “divide and conquer” algorithm. The key is compared with the middle element of

Thursday, 2 February 2012

Read Only Memory (ROM)


  • Permanent storage


—   Nonvolatile




  • Microprogramming (see later)

  • Library subroutines

  • Systems programs (BIOS)

  • Function tables


Types of ROM



  • Written during manufacture


—   Very expensive for small runs




  • Programmable (once)

Wednesday, 1 February 2012

String and StringBuffer

Immutability of String objects


As you know, Strings are objects in Java code. These objects, however, are immutable. That is, their value, once assigned, can never be changed. For instance:

String msg = "Hello";
msg += " World";


Here the original String "Hello" is not changed. Instead, a new String is created with the value "Hello World" and assigned to the variable