Interview questions for CSE
The most probable CSE interview questions that can be asked are related to the basic computer languages like C and object-oriented languages like C++ and Java. A high level of understanding and working knowledge of C is considered a prerequisite by most of the software firms today looking to employ CS engineers. Every Computer Science interview is different and the scope of a job is different too. Keeping this in mind we have designed the most common. Computer Science interview Questions and answers to help you get success in your interview.
Therefore, in addition to our interview preparation resources, we have therefore put together a list of the top 10 computer science interview questions and answers which will help you to join IT industries and will further help you to stand out against the competition.
Top Interview questions for CSE
1. What is a file?
A file is a named location which stores data or information permanently. A file is always stored inside a storage device using file name (e.g. STUDENT.MARKS). A file name normally has primary and secondary name separated by a DOT.
2. What is your salary expectation?
In this question, one have to answer what is appropriate without giving it any second thought. One thing to keep in mind is that does not hesitate while telling this and demand a salary which you do not worth.
3. What is a constructor?
A constructor is methods which are used to create an Object of class. There are two types of constructor Default & Parameterized constructor.
4. Differentiate between C and C++?
Though there’s no such answer to this, here the interviewer checks only the knowledge of these common programme languages to see whether you can compare and contrast them.
5. What is the different OOPS principle?
The basic OOPS principle are as follows,
6. What is polymorphism?
Polymorphism is the ability of an object to take on multiple forms. Most commonly polymorphism is used in OOP when a parent class reference is used to refer to a child class object.
7. How would a people describe you?
This is one of the most common questions to answer which therefore allows you to differentiate yourself from the competition and share why one would be an asset to the company. One can then elaborate on these by adding his/her skills which will in future benefit the prospective organization.
8. What is the different type of access modifiers?
There are four type of access modifiers as given below
• Visible to the overall package. No modifier needed.
• Private – Visible to class only.
• Public – Visible to the world.
• Protected – Visible to package and subclass.
9. What do you mean by Operating Overloading?
Operating Overloading is actually a process of and ability to redefine the way an object responds to a C++ operator symbol. Therefore, it would be done in the object’s class definition.
10. Difference between overloading and overriding ?
Overloading is when two or more methods in the same class have the same method name but different parameters (i.e different method signatures).
Overriding is when two methods having the same method name and parameters (i.e., method signature) but one of the methods is in the parent class and the other is in the child class.
11. What is a stream?
A stream can be defined as the sequence of data. There is two types of streams.
Input Stream: Used to read data from a source.
Output Stream: Used to write data into a destination.
12. What do you mean by virtual destructor?
One of the simplest answers to this question is one that is declared with the virtual attribute. So if one destroys an object through a pointer and if the base-class destructor is not virtual, then the derived class destructions are not executed and thus the destruction might not be completed.
13. What is a Character stream?
Java Character stream is basically used to perform input and output for 16 bit Unicode. The main classes’ users are File Reader and File Writer which internally uses File Input Stream and File Output Stream so the basic difference is that File Reader and File Writer read and writes two bites at a time respectively.
14. What is an abstract class?
A class that contains the abstract keyword in a declaration is called abstract class. The properties of the abstract class are as follows:-
• Abstract classes may or may not contain abstract methods but, if a class has at least one abstract method, then it must be declared abstract.
• The abstract class cannot be instantiated.
• To use an abstract class, we have to inherit it from another class.
• If we inherit an abstract class, then we have to provide implementations to all the abstract methods in it.
15. What is a default constructor? What is a conversion constructor?
A default constructor either has no arguments, or all of the arguments have default argument values. A conversion constructor accepts one argument of a different type and uses this as a way to infer conversion rules for a class.
16. What is multiple inheritances? What are its advantages and disadvantages?
Multiple inheritances is the process where a subclass can be derived from more than one superclass. Its advantage is that a class can inherit the functionality of more than one base class, but its disadvantage is that it can lead to a lot of confusion when two base classes implement a method with the same name.