Shorthills AI
Skipper Interview Questions and Answers
Q1. What is the difference between struct and objects ?
Struct is a value type while object is a reference type in C#.
Structs are value types and stored on stack, while objects are reference types and stored on heap.
Structs are passed by value, while objects are passed by reference.
Structs do not support inheritance, while objects do.
Example: struct Point { int x, y; } vs class Point { int x, y; }
Q2. Compilier Programming language and Intepreter Programming language examples
Compiler programming languages convert source code into machine code before execution, while interpreter programming languages execute code line by line.
Compiler programming languages: C, C++, Java
Interpreter programming languages: Python, Ruby, JavaScript
Q3. Difference Between let var and Const ?
let, var, and const are all used to declare variables in JavaScript, but they have different scopes and mutability.
let: block-scoped, can be reassigned
var: function-scoped, can be reassigned
const: block-scoped, cannot be reassigned, but its properties can be modified
Q4. What is polymorphism?
Polymorphism is the ability of a function or method to behave differently based on the object it is called with.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables a single interface to be used for different data types.
Examples include method overloading and method overriding in object-oriented programming.
Q5. Find the mid element in the link list.
To find the mid element in a linked list, use two pointers - one moving at double the speed of the other.
Initialize two pointers, slow and fast, both pointing to the head of the linked list.
Move the slow pointer by one step and the fast pointer by two steps until the fast pointer reaches the end of the list.
The element pointed to by the slow pointer at this point is the mid element of the linked list.
Q6. Tell me about virtual function
Virtual functions allow a function to be overridden in a derived class
Virtual functions are declared in a base class and can be overridden in derived classes
They are used in polymorphism to achieve runtime binding
Virtual functions are implemented using virtual keyword in C++
Example: virtual void display() = 0; // pure virtual function
Interview Process at Skipper
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month