By admin | January 12, 2009
What is sed? - sed is stream editor, a Unix tool for working with streams of text data. See the awful truth about sed.
How do you substitute strings with sed? - Use ’s/old/new’ command, so sed ’s/hello/goodbye/’ would substitute the occurrence of the word hello to goodbye.
How do you inject text with sed? - & [...]
Nick Halstead on his blog posts a list of interview questions from Yahoo! that a friend of his supplied, apparently free of NDA. Yahoo! is a strong PHP shop, with a few big names like Rasmus Lerdorf leading PHP development there.
A few questions on PHP functions, and “what does this code do?” type of [...]
How do you find out what’s your shell? - echo $SHELL
What’s the command to find out today’s date? - date
What’s the command to find out users on the system? - who
How do you find out the current directory you’re in? - pwd
How do you remove a file? - rm
How do you remove a
By admin | January 2, 2007
As system administrator, you type “debug ipx sap” and receive the following lines as part of the IOS response: type 0×4, “HELLO2″, 199.0002.0003.0006 (451), 2 hops type 0×4, “HELLO1″, 199.0002.0003.0008 (451), 2 hops What does “0×4″ signify?
* That is a Get Nearest Server response.
* That it is a General query.
* That it [...]
By admin | December 31, 2006
Frequently a question of the programs printing out their own output appears in code interviews. The question does not really test a skill of a programmer, as much as general awareness of tricks to do that. The quine page by Gary Thompson provides many examples of such applications in various languages. In case you were [...]
age = 63;
With that in mind, look at the following program:
———— program 5.2 ————–
#include
#include
struct tag{ /* the structure type */
char lname[20]; [...]
A Reintroduction to JavaScript from Simon Willison all on one page. Why a re-introduction? Because JavaScript has a reasonable claim to being the world’s most misunderstood programming language. While often derided as a toy, beneath its deceptive simplicity lie some powerful language features. The last year has seen the launch of a number of high [...]
By admin | December 12, 2005
What does a special set of tags <?= and ?> do in PHP? - The output is displayed directly to the browser.
What’s the difference between include and require? - It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. [...]
This set arrived from a system integration shop.
What is EAI? What are the tools are used? - EAI is Enterprise Application Integration. Tools used are: WebSphere ICS, WebSphere MQ series, WebSphere Application Server, Tibco, Seebeyond, Vitria etc.
What is Integration? - Integration is nothing but integrating different applications softwares like SAP, Oracle, PeopleSoft, Seibel etc. which [...]
By admin | April 24, 2005
List the files in current directory sorted by size ? - ls -l | grep ^- | sort -nr
List the hidden files in current directory ? - ls -a1 | grep "^\."
Delete blank lines in a file ? - cat sample.txt | grep -v ‘^$’ > new_sample.txt
Search for a sample string in particular files [...]
By admin | December 7, 2003
1. How do you write a function that can reverse a linked-list? (Cisco System)
void reverselist(void)
{
if(head==0)
return;
if(head->next==0)
return;
if(head->next==tail)
{
head->next = 0;
tail->next = head;
}
else
{
node* pre = head;
node* cur = head->next;
node* curnext = cur->next;
head->next = 0;
cur->next = head;
for(; curnext!=0; )
{
cur->next = pre;
pre = cur;
cur = curnext;
curnext = curnext->next;
}
curnext->next = cur;
}
}
2. What is polymorphism?
Polymorphism is the idea that a base class can [...]