0% found this document useful (0 votes)
100 views

Mock Interview Questions

The document contains a list of common interview questions under different categories such as general/behavioral questions, subject knowledge questions, programming questions, programming language questions, and problem solving questions. Some example questions include explaining the differences between TCP and UDP, writing programs to add two numbers, find prime numbers, and sort arrays, and solving problems involving handshakes, poles and ropes, light bulbs, and friends traveling towards each other.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

Mock Interview Questions

The document contains a list of common interview questions under different categories such as general/behavioral questions, subject knowledge questions, programming questions, programming language questions, and problem solving questions. Some example questions include explaining the differences between TCP and UDP, writing programs to add two numbers, find prime numbers, and sort arrays, and solving problems involving handshakes, poles and ropes, light bulbs, and friends traveling towards each other.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

https://codeshare.

io/zyXl84
Mock Interview Questions:
* General / Behavioural Questions:
* Tell me about yourself
* Strengths & Weaknesses
* What is your fav programming language, and why?

* Subject Knowledge:
* What is a protocol?
* What is the difference between TCP and UDP?
* What is a deadlock?
* What is a process?
* What is the difference between a process & thread?
* ACID properties in Data base systems
* What do you know about joins in DBMS?
* What are different scheduling algorithms used in Operating Systems?
Explain FCFS, SJF, Round Robin algorithms. Pros and cons of these.
* What is Decode & Conquer, Greedy algorithm tehcniques?
* What is a kernel?
* Differences bw IPV4 & IPV6

* Programming Questions:
* Write a program to add 2 numbers using C lang.
* Are there any limitations?
* What will be the value of 1B + 1B using the program?
* Write a program to return the sum of first n natural numbers using C
lang.
* What is the time complexity?
* Are there any limitations?
* What will be the value if n = 1B?
* Write a program to say if a given number is prime or not
* Write a program to print first n prime numbers
* Write a program to convert a string of 0s & 1s to decimal number.
* Write a program to sort a list of values using:
* Bubble sort
* Quick sort
* Merge sort
* Write a program to search an element from a list of elements using
Binary search.
* 0-1 sort
* Array multiplication within itself
* Swap two numbers:
* In a single line
* Without using 3rd variable
* Print "Hello World" without using semicolon
* What is the output of - "printf("%d", printf("Hello World");" - ?
* Write a program to return a substring with only consonent alphabets
from the given string.
* If they remove vowels, give special characters in the
string and ask them to run through the program.
* There is an array with positive integers in it. All the numbers in
that array are repeated twice except one number. Find the number:
* If the array is sorted
* If the array is not sorted
* Questions around time & space complexity
* Write a program to toggle lower & upper case characters in a given
string.
* Write a program to return the missing number from an array containing
first n natural numbers except one number
* If the array is sorted (in O(logn))
* If the array is not sorted
* Questions around time & space complexity
* Write a program to return the base 8 of a number when binary string
is given.
* Write a program to return 1 if a given string consists of unique
chars and 0 otherwise.

* Programming Language:
* Which is faster - C or Python?
* Is Java purely object oriented?
* What are primitive data types in Java?
* What is an object?
* What is a constuctor in Java?
* What are OOPs concepts?
* Explain polymorphism
* Explain inheritence
* What is method overloading? Run-time or compile-time polymorphism?
* What is method overriding? Run-time or compile-time polymorphism?
* What are different types of inheritences? Is multiple inhenritence
possible in Java?
* Difference between malloc & calloc
* What is realloc?
* Time complexity of:
* Binary search
* Merge sort
* Quick sort
* Bubble sort
* What is the pre-condition for binary search?
* What is a stack, queue
* What is the super class of all classes?
* What is the return type of sizeof operator?
* What is the size of an integer in C?
* Questions on pointers:
* What is the size of a pointer?
*
* What is a garbage collector?

* Problem Solving:
* Basic:
* There are n people in a room. If all of them shook hands
with each other what will be the total number of hand-shakes that happened in that
room?
* Two poles 50m each, 80m rope, 10m from ground
* Total number of squares on a chess board?
* There are 100 bulbs with corresponding switches. All
bulbs are in Off state initially and all of them are numbered. There are 100
people. Person-1 goes in an toggles all the switches. Person-2 goes in and toggles
switches that are numbered with multiples of 2. Similarly all the remaining persons
toggles the switches that are numbered with multiples of their numbers. After all
100 people are done, how many bulbs are in turned on state?
* There is a rabbit and carrot separated by a distance of
100m and the rabbit is moving. At any point, the distance between rabbit and carrot
is reduced to half each second. At what time
* Two friends A & B were at a distance of 100 KMs. They
start travelling towards each other. The speed of A is 40 KMPH and that of B is 60
KMPH. There is a fly travelling at a speed of 117 KMPH. This fly starts from A,
reaches B, instanty turns back and reaches A. It continues this until both the
friends meet. What is the distance travelled by the fly?
*

You might also like