Python interview questions and answers

comp.lang.python group recently had a discussion on which interview questions to ask a candidate, with Tim Chase suggesting the following list (redacted from original to include just Python-related material). As you can see, some generic programming questions and some process questions made the list:

  1. Do they know a tuple/list/dict when they see it?
  2. When to use list vs. tuple vs. dictionary vs. set?
  3. Can they use list comprehensions (and know when not to abuse them?)
  4. Can they use tuple unpacking for assignment?
  5. String building. Do they use “+=” or do they build a list and use .join() to recombine them efficiently?
  6. Truth-value testing questions and observations (do they write “if x == True” or do they just write “if x”)?
  7. Basic file-processing (iterating over a file’s lines)
  8. Basic understanding of exception handling
  9. Read More »

Posted in Web dev | 3 Comments

Some C++ interview questions

  1. What is a void return type?
  2. How is it possible for two String objects with identical values not to be equal under the == operator?
  3. What is the difference between a while statement and a do statement?
  4. Can a for statement loop indefinitely?
  5. How do you link a C++ program to C functions?
  6. How can you tell what shell you are running on UNIX system?
  7. Read More »

Posted in C++ | 28 Comments

Perl self-test questions

Dr. Dobb’s Journal in its Linux and open source section is running an article by Emmett Dulaney with 50 Perl questions and answers. The focus is mainly on the knowledge of the language itself with questions like:
- What is the simplest type of data that Perl can work with?
- Which operator can be used to take the bottom item from an array?
- You want to close the directory handle EVAN. Which of the following should you use to accomplish this?
- You want your script to read in a value from the keyboard for a variable named $duo. What do you set $duo equal to in the program to have it read a keyboard value? __________ (Fill in the blank.)
- Your script has just read in a variable from the keyboard and you want to strip that variable of the newline character that came in. What operator should you use to perform this operation?

Answers are available on Dr. Dobb’s Journal site.

Posted in Unix/Linux, Web dev | 8 Comments

71 basic SQA / testing interview questions

  1. What is the Difference between Project and Product testing? What difference you have observed while testing the Clint/Server application and web server application
  2. What are the differences between interface and integration testing? Are system specification and functional specification the same? What are the differences between system and functional testing?
  3. What is Multi Unit testing?
  4. What are the different types, methodologies, approaches, methods in software testing
  5. What is the difference between test techniques and test methodology?
  6. Read More »

Posted in Testing | 11 Comments

Basic shell scripting questions

  1. How do you find out what’s your shell? - echo $SHELL
  2. What’s the command to find out today’s date? - date
  3. What’s the command to find out users on the system? - who
  4. How do you find out the current directory you’re in? - pwd
  5. How do you remove a file? - rm
  6. How do you remove a - rm -rf
  7. How do you find out your own username? - whoami
  8. How do you send a mail message to somebody? - mail somebody@techinterviews.com -s ‘Your subject’ -c ‘cc@techinterviews.com
  9. Read More »

Posted in Unix/Linux | 9 Comments

MySQL management interview questions

  1. How do you show the currently running queries? - SHOW FULL PROCESSLIST;
  2. How do you kill a MySQL query? - See the ID of it from the question above, then KILL id. You can separate multiple IDs by space.
  3. I need to find out how many client connections were aborted by MySQL server. - It’s displayed in SHOW STATUS query, alternatively accessible via mysqladmin extended-status.
  4. What does SET SQL_AUTO_IS_NULL =1 do? - you can find the last inserted row for a table that contains an AUTO_INCREMENT column by issuing WHERE auto_increment_column IS NULL
Posted in Database, Unix/Linux | Leave a comment

DBA Interview Questions and Answers

Sean Hull wrote a few interview questions for Database Journal dealing mostly with Oracle:
- Why is a UNION ALL faster than a UNION?
- What are some advantages to using Oracle’s CREATE DATABASE statement to create a new database manually?
- What are three rules of thumb to create good passwords? How would a DBA enforce those rules in Oracle? What business challenges might you encounter?
- Describe the Oracle Wait Interface, how it works, and what it provides. What are some limitations? What do the db_file_sequential_read and db_file_scattered_read events indicate?
- How do you return the top-N results of a query in Oracle? Why doesn’t the obvious method work?
- Can Oracle’s Data Guard be used on Standard Edition, and if so how? How can you test that the standby database is in sync?
- What is a database link? What is the difference between a public and a private database link? What is a fixed user database link?

The database interview answers are all listed on Database Journal Web site.

Posted in Database | 4 Comments

DAC interview questions and answers

  1. What is the IC numbers for DAC that you have used in the lab?
  2. Define resolution. What is the resolution of DAC that you have used in the lab?
  3. How many pins does DAC IC have?
  4. What are the types of DAC?
  5. Which technique you have used for DAC interfacing
  6. Which type of DAC you have used in the lab?
  7. Define all the specifications of DAC.
  8. What are the advantages of binary ladder type DAC over weighted resistance type DAC?
  9. What are the applications of DAC?
  10. Explain block diagram IC 0808?
  11. Explain the logic of DAC program.
  12. Explain the interfacing of DAC with 8086.
Posted in Hardware | 5 Comments

x86 programming interview questions and answers

  1. What is an interrupt?
  2. Which are the hardware and software interrupts in 8086?
  3. Mention the priority of interrupts in8086.
  4. What is int1, int2, int3?
  5. What is NMI interrupt?
  6. What is IVT in 8086?
  7. Read More »

Posted in General | 4 Comments

8251 USART interview questions and answers

  1. What is IC 8251?
  2. How many pins does IC 8251 have?
  3. What is USART?
  4. Why 8251 is called a USART?
  5. Read More »

Posted in Hardware | 12 Comments

IC 8253 and IC 8259 interview questions and answers

  1. What is IC 8253?
  2. How many pins does IC 8253 have?
  3. How many counters are there in 8253?
  4. What is the size of counters in 8253?
  5. With binary & BCD counters, what is the range of count?
  6. Explain control word format of 8253?
  7. Read More »

Posted in Hardware | 2 Comments

Interview questions for a low-level programmer

  1. What is assembler?
  2. What is linker?
  3. What is debugger?
  4. What is compiler?
  5. What is locator?
  6. What is emulator?
  7. Read More »

Posted in General | 9 Comments