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

Technical Interview Questions

Technical
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
11 views

Technical Interview Questions

Technical
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
Technical Interview Question And Answers What is Artificial Intelligence? Ans, — Artificial Intelligence is a technology that is used in computer science, It is used for creating an intelligent machine that can behave like a human; it can solve any task What is the full form of SDLC? Ans, ~The full form of SDLC process that prov le. Itis a well-known ‘oftware Development Life C: les quality software products in a short time. If you have to learn a new programming language for this job, what will you do? Ans, ~ I’m always ready to learn, And I’ve learnt many programming languages like- C, C++, Java, Python.. So, I think I will learn the new language smoothly as well. Why should we hire you? ‘Ans, ~ [am a fresher but I have the required qualification that you are looking for. I cannot ask you to hire me, but I can assure you that I will prove my worth and deliver quality work if you hire me, In what position do you see yourself 5 years from now? Ans, — As a fresher, it is very difficult to say but still, I want to be in a successful position with lots of experience and give the proud moment for my company. + C++ language can run on any platform. + C+ contains a rich function library. + C++ is an object-oriented programming language that includes the concepts such as classes, objects, inheritance, polymorphism, abstraction. + Data hiding helps the programmer to build secure programs so that the program cannot be attacked by the invaders. Explain what are Operators and explain with an example? Operators can be defined as basic symbols that help us work on logical and mathematical operations. Operators in C and C++, are tools or symbols that are used to perform mathematical operations concerning arithmetic, logical, conditional, and, bitwise operations The different types of operators available for C++ are Assignment Operator, Compound Assignment Operator, Arithmetic Operator, Increment Operator, and so on. Comment on Assignment Operator in C++? An assignment operator in C+ is used (o assign a value to another variable, x= 5;This line of code assigns the integer value 5 to variable a, The pat at the left of the = operator is known as an dvalue (left value) and the right as an rvalue (right value). ‘The Lvalue must always be a variable whereas the value can be a constant, a variable, the result of an operation, or any combination of them: Define namespace in C++? ‘A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. Namespaces are used to organize code into logical groups and to prevent name collisions that can occur especially when your codebase includes multiple libraries. Define Pointers? + Poiates is a special type of variables that are used to stoce the memory address of the other variables. * Pointers are declared normally as other variables with a difference of * that is present in front of the pointer identifier What is Between Global Variables And Static Variable: + Global variables: Global variables are variables that are defined outside the function. ‘The scope of global variables begins at the point where they are defined and lasts till the end of the file/program. «Static variables: Static variables are private to the source file where they are defined and do not conflict with other variables in other source files which would have the same name, Define Encapsulation in C++? The process of encapsulating data and functions in a class is called encapsulation, For security purposes, it is used to prevent direct access to data. This is accomplished by using class functions. For example, the net banking facility for customers allows only the approved person with the proper login id and password to access the information in the bank data source, and only for his or her part of the information, C++ Interview Questions and Answers 2022 1. What is C++ programming? + Cwas a procedural language ie. it didn’t have the concept of classes and objects © C++ was made to cover this and additional functionalities of Object-Oriented Programming were added, + C++ features © Object-Oriented © Procedural o Case Sensitive Generic 2.Difference between C and C++ ? 1. Cit can be considered as a superset of C, most C programs except some exceptions, work in C++ and C. 2. C programming is a Lite bit limited and is a procedural progrunming language, but C+ supports both procedural and Object-Oriented programming 3. Since C++ supports object-oriented programming, it is capable of performing tasks like function overloading, templates, inheritance, virtual functions, friend functions. These features are not present in C. 4. C++ supports exception handling at the language level, in C exception handling is done in the traditional ifelse style. 5. C++ supports references, C doesn’t What are the advantages of a C++ program? Some of the main advantages of the C+ programming language are: «C++ includes the concept of inheritance. Through inheritance, one can reduce redundancy in the code and can reuse the existing classes. + Message passing is a technique used for communication between objects. OOPS Interview Questions and Answers What is a class? A class is nothing more than a description of an object. It is a model, design, or prototype that describes an object's features What is an object? An object is termed as an instance of a class, and it has its own state, behavior, and ide! Define a constructor. A constructor is a method used to initialize the state of an object, and it gets invoked at the time of object creation Rules for constructor are: + Constructor Name should be the same as the class name + A constructor must have no return type. What is a super A superclass or base class is a class that acts as a parent to some other class or classes. For example, the Vehicle class is a superclass of Class Car. or, BMW is a type of car, so the superclass for BMW is Class Car. Differentiate between overloading and overriding. ‘Overloading + 1, ovo or more methods have same name but different parameters or signatures 2. resolved during compile time Overriding: 1, child class redefining methods present ia the base class or parent class with the same Parameters/signatures 2. resolved during man time What is a try/ catch block? A try/ catch block is used to handle exceptions. The try block defines a set of statements that may lead to an error. The catch block basically catches the exception, What is exception handling? Exception handling in Object-Oriented Programming is a very important concept that is used to manage errors. An exception handler allows errors to be thrown and caught and implements centralized mechanism to resolve them. What is Encapsulatio: Encapsulation is a feature of an entity that holds all secret data, The members of that class can only see the hidden details, Public, Protected, Private are the different levels. What is Inheritance? Explain the use of Inheritance? Inheritance is a concept where one class shares the structure and behavior defined in another class. Inheritance applied to one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance. Us + For Method Overriding (so rai + For Code Reusability. 1 polymorphism can be achieved). What are Static Binding and Dynamic Binding? + Static Binding is « binding in which the name can be combined with the class during collection also called early binding. + Dynamic Binding is a binding in which name can be identified with the class dusing execution time, and it is also known as Late Binding. What is a need for Object-oriented programming? Need for OOPS:~ more protection and control over data access OOPS offers data hiding functionalities code reusability data redundancy code maintenance What are the various types of constructors? ‘There are three types of constructors: «Default Constructor — With no parameters. + Parametric Constructor — These constructors are those having parameters. Create a new instance of a class and also pass arguments simultaneously. + Copy Constructor — This creates a new object as a copy of an existing object. What i a destructor? It is a method which is called when the object is destroyed. Destructor name is the same as class name with “~" symbol before the name. What is an abstract class? Abstract classes are special classes which are declared but are initialized, which means that it is not possible to create an object for the abstract class. What are the characteristics of an abstract class? + There can only be one class + Derived class used abstract class to create interfaces + They are used for upeasting What is casting? In C+ we ereate a pointer reference between parent and child (classes and form an “is a” relationship between them, This is known as casting and they are of two types:= + Upeasting + Downcasting DSA Interview Questions And Answers For Freshers ai = Qstudocu Qzy Technical Interview Quest... 0 Q Wh: he various types of constructor Tinea 1+ Default Constructor What is a destructor? What is an abstrac DSA Interview Questions And Answers For Freshers aA @ studocu.com @ < o no @ A data structure is a way of organizing the data so that the data can be used efficiently. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks, For example, B-trees are purticularly well-suited for the implementation of databases, while compiler implementations usually use hash tables to look up identifiers. What is a linked list? A linked list is a sequence of nodes in which each node is connected to the node following it. This forms a chain-like link for data storage. Deser Data Structures are mainly classified into two types: ibe the types of Data Structures. + Linear Data Structure: A data structure is called linear if all of iis elements are arranged in sequential order. In linear data structures, the elements are stored in a non- hierarchical way where cach item has successors and predecessors except the first and last elements, + Non-Linear Data Strueture: The Non-linear data structure does not form a sequence i.e, each item or element is connected with two or more other items in a non-linear arrangement. The data elements are not arranged in a sequential structure, d List. lain different types of L ‘Types of Linked List : 1. Singly Linked List: In this type of linked list, every node stores the address or reference of the next node in the list and the last node has the next address or reference as NULL. For example 1->2->3->4->NULL. 2. Doubly Linked List; Here, here ure two references associated with euch node, One of the reference points to the next node and one to the previous node, Eg. NULL<-1<- >2<-53->NULL 3. Circular Linked List: Circular linked list is a linked list where all nodes are connected to form a circle, There is no NULL at the end. A circular linked list can be a singly ular linked list or doubly a circular linked list. Eg. 1->2->3->1 [The next pointer of the last node is pointing to the first] What are the operations that can be performed on a data- structures? Following operations can be performed + Insertion: Adding a new data item. + Deletion: Deleting the existing data item, © Searching: Finding a particular data item. © Sorting: Arranging the data item in a particular sequence. What A queue is a data structure that can simulate a list or stream of data. In this structure, new elements are inserted at one end, and existing elements are removed from the other end. What are multidimensional arrays? ‘Multidimensional arrays make use of multiple indexes to store data. It is useful when storing data that cannot be represented sing single-dimensional indexing, such as data representation ith data stored in more than one column. in a board game, tables What is shell sort? Shell sort is a generalized version of insertion sort. It is a highly efficient sorting algorithm. In shell sort, we break the original list into several smaller sub lists, each of which is sorted using an insertion sort What is stack? In data structure, stack is an abstract Last in First Out method, Why do we use queues? 1 type (ADT) used to store and retrieve values in the As Queues follows FIFO method, they are used when we need to work on data items in exact sequence of their arrival. Every operating system maintains queues of various processes. Priority queues and breadth-first traversal of graphs are some examples of queues. What is selection sort? In the selection sort technique, the list is divided into two parts. In one part all elements are sorted and in another part the items are unsorted. At first we take the maximum or minimum data from the array. After getting the data (say minimum) we place it at the beginning of the list by replacing the data of first place with the minimum data

You might also like