Professional Documents
Culture Documents
Tcs 3
Tcs 3
and their complexities etc during CTS interviews. Below are few sample questions (easy) for
your practice.
Interview Question 1
Can u tell a simple difference between candidate keys and primary key ?
Answer 1
Both candidate and primary keys uniquely identify a row in a table. However, only one can be
chosen as primary key, while there can be many candidate keys.
Interview Question 2
Answer 2
No, semicolon is not essential at the end of a block statement. For example, consider a statement
of the form if(x==5){...some statements...}
In the above statement, there is no need for semicolon after the closing '}'.
Interview Question 3
Consider there are two programs written respectively using two algorithms A and B. Say A has a
complexity of n^2 and the other has a complexity of n/2. Given the same number of inputs which
would take longer time to run.
Answer 3
First program written using algorithm A will take longer time. Higher the order of complexity,
longer the time taken for execution.
Interview Question 4
How microcontroller is different from microprocessor with respect to hardware and memory
requirements ?
Answer 4
Microcontroller, unlike microprocessor, is self contained with necessary hardware like I/O,
memory etc embedded to it.