1. Why so JavaScript and Java have similar name? A. JavaScript is a stripped-down version of JavaB. JavaScript's syntax is loosely based on Java's C. They both originated on the island of JavaD. None of the above
2. When a user views a page containing a JavaScript program, which machine actually executes the script? A. The User's machine running a Web browser B. The Web serverC. A central machine deep within Netscape's corporate officesD. None of the above
3. ______ JavaScript is also called client-side JavaScript. A. MicrosoftB. NavigatorC. LiveWireD. Native
4. __________ JavaScript is also called server-side JavaScript. A. MicrosoftB. NavigatorC. ...
Wednesday, 27 April 2011
Sunday, 17 April 2011
JavaScript interview questions and answers
What’s relationship between JavaScript and ECMAScript? - ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.
What are JavaScript types? - Number, String, Boolean, Function, Object, Null, Undefined.
How do you convert numbers between different bases in JavaScript? - Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);
What does isNaN function do? - Return true if the argument is not a number.
What is negative infinity? - It’s a number in JavaScript, derived by dividing negative number by zero.
What boolean operators does JavaScript support? - &&,...
Java threads question set
Do I need to use synchronized on setValue(int)? - It depends whether the method affects method local variables, class static or instance variables. If only method local variables are changed, the value is said to be confined by the method and is not prone to threading issues.
Do I need to use synchronized on setValue(int)? - It depends whether the method affects method local variables, class static or instance variables. If only method local variables are changed, the value is said to be confined by the method and is not prone to threading issues.
What is the SwingUtilities.invokeLater(Runnable) method for? - The static utility method invokeLater(Runnable) is intended to execute a new runnable thread from a Swing application without disturbing the normal sequence of event dispatching...
C questions for a hardware engineer
What are the total number of lines written in C/C++? What is the most complicated/valuable program written in C/C++?
What compiler was used?
Have you studied buses? What types?
Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what is the latency of an instruction in a 5 stage machine? What is the throughput of this machine ?
How many bit combinations are there in a byte?
What is the difference between = and == in C?
Are you familiar with VHDL and/or Verilo...
Friday, 1 April 2011
Embedded firmware interview questions
Write function in C that gets array of chars, and search for the longest sequence of repeatedly 1 bits. It returns the the first bit place in the sequence and the number of 1 bits in the sequence. - (a) loop of 2^0, 2^1, … , 2^7 is done with 1<<j when 0<=j<=7. (b) Take care of remembering the first place of the bit sequence you are counting.
You have 16bit register that increment itself and loops about every second. When the register reach 0xffff it will issue an interupt and will run the function update_time(). There is a function unsigned long get_time() that returns the time. You need to implement the two functions. - (a) You need to count every interrupt in order to save the number of seconds. (b) The counter will be the 16bit MSB, and the...