Most Important Technical or Programming Question and Answer | factsofanoymousbaba

Most Important Technical or Programming Question and Answer


 
"most important technical question and answer which is asked in mainly interview"


 Ques:- What do you understand by Exception Handling?

Ans:-  Exception handling is a process of handling exceptions that occurs during the execution of a program. Due to the occurrence of an exception, the execution of programs gets get halted, so it is very important to handle these exceptions so that the program can be executed smoothly. We can handle the exceptions by using five keywords: try, catch, throw, throws, and finally.


 Ques:- What is a checked and unchecked exception?

Ans:-

  • Checked exception: If the exception occurs or is checked at compile time during the execution of a program. It is called the checked exception. We should handle these exceptions using try-catch block or using throws keyword. e.g.., if someone tries to read a file that is not present then it will throw a checked exception at compile time FileNotFoundException.
  • Unchecked exceptions: If the exception is not checked at compile-time and occurred at runtime then this type of exception is called an unchecked exception. This type of exception occurs due to an error in the logic of the code. If we do not handle this type of exception then also will not a compilation error. e.g.., ArithmeticException

Ques:- What is an API?

Ans:- API stands for "Application Programming Interface". An API is a set of programming codes that enables data transmission between one software product and another. It also contains the terms of this data exchange.

Types of APIs

  • Private:- APIs are solely used within an organization and are mostly built for company emptiness.
  • Partner:- Openly promoted but available for know business partners and end customers or business users are potential target audiences for such an app.
  • Public or external:- Available to any third-party developers and apps with public APIs are mostly designed for end customers.


Ques:- What is a process and what is a thread?

Ans:- A thread is a lightweight sub-process, the smallest unit of processing. It is a separate path of execution.

                        Threads are independent that means if there is an exception in one thread, it doesn't affect other threads. It uses a shared memory area. The process is heavyweight and can consist of multiple threads. It is a small part of a program.


Ques:- What do you mean by active and passive objects?

Ans:- 

Active Object: Active Objects are one which instigates an interaction that owns a thread and they are responsible for handling control to other objects. In simple words, it can be referred to as a client.

Passive Object: Passive objects are one, which passively waits for the message to be processed. It waits for another object that requires its services. In simple words, it can be referred to as a server.


Ques:- Define the SQL Profiler?

Ans:-  SQL Profiler can be defined as the profiler utility which is mainly used to track connections to the SQL Server and also determine the activities such as which SQL Scripts are running, and which one is getting failed, etc.


Ques:- Explain the basic features of OOPs?

Ans:-

Object: An object is a physical entity that has a state and behavior. It occupies space in memory. It is a sample of a class. Object helps to access the methods and variables in the program.

  • Class: A class is a "collection of objects". A class is a logical entity, which does not take any space. A class includes all the data and methods which show the behavior of an object.
  • Inheritance: Inheritance is a process by which one class can have all the properties of another class. Inheritance increases the code reusability. There are two terms used

1. Child class (Subclass): Class which inherits other class, called as Child class or derived class.

2. Parent class (Superclass): A class that got inherited by another class is termed as a parent class or Base class.

  • Polymorphism: Polymorphism is a method of performing "a single task in different ways". Polymorphism enables a programmer to use methods or operators in different ways. In Java, we use method overloading and overriding to obtain the Polymorphism. There are two types of polymorphisms:- 
                - Compile-time polymorphism- The function call is resolved by the compiler at the compile time itself. For example, function or method overloading. It is also known as Early binding.
                - Runtime polymorphism- The function call is resolved by the compiler at the runtime. For example, method overriding. It is also known as Late binding or Dynamic binding.
  • Abstraction: If we show only functionality and hide the explanations or details then this process is called Abstraction. It is the property by virtue of which only essential details are displayed to the user. For achieving the abstraction, we use two ways in Java

1. Abstract class

2. Interface

  • Encapsulation: Encapsulation is a process of enclosing the data and code together to form a single unit. It makes the data safer within the code for any modification. For achieving the encapsulation, we can declare the data variable of class as private.

 
Ques:- Differentiate between class and object?

Ans:-  The class and object both are the features of OOPs concepts. The basic differences between both features are given below:

  • The class is a logical entity whereas an object is a physical quantity.
  • Class does not occupy memory at the time of creation whereas object occupied space in memory when it is created.
  • For declaring a class, we use a 'class' keyword followed by a class name, whereas we can create the object using the 'new' keyword in Java.
  • A class is like a factory that generates objects and objects are the instances of the class.

 
Ques:- What is Asynchronous Programming?

Ans:-  An asynchronous model allows multiple things to happen at the same time. When you start an action, your program continues to run. When the action finishes, the program is informed and gets access to the result (for example, the data read from disk). It can also be considered as means of parallel programming in which a unit of work runs separately from the main application thread and notifies the calling thread of its completion, failure, or progress.

You may be wondering when you should use asynchronous programming and what are its benefits and problem points. The main benefits one can gain from using asynchronous programming are improved application performance and responsiveness.


 
Ques:- What is Polymorphism?

Ans:-  Polymorphism means many forms.

In simple words, it means that different actions will be performed in different instances.

A single object can refer to the super-class or sub-class depending on the reference type which is called polymorphism for example the same name of a function.

  • Method Overloading
  • Operator Overloading


 
Ques:- What is Overloading?

Ans:-  Method overloading happens for different classes or within the same class.

For method overloading, the sub-class method should satisfy the below conditions with the super-class method or methods in the same class itself:

We can say that there are two functions with the same name but they are having different argument types or different return types at this situation we called the method overloading. 


 Ques:- What is Proxy Server?

Ans:-  In computer networking, a proxy server is a server application or appliance that acts as an intermediary for requests from clients seeking resources from servers that provide those resources. It prevents external users which are unauthorized to access the network.


 Ques:- What is the difference between classes and interface?

Ans:- 

  • A class can be instantiated by creating its object, whereas an interface cannot be instantiated as all the methods in the interface are abstract and do not perform any action, so there is no use of instantiating an interface.
  • A class is declared using the class keyword whereas an interface is declared using the interface keyword.
  • The members of the class can have access specifiers such as public, protected, and private but members of the interface can not have the access specifier, all the members of the interface are declared as public because the interface is used to derive another class. There will be no use to access specifies inside the members of an interface.
  • The methods inside the class are defined to perform some actions on the fields declared in the class whereas interface lacks in asserting in areas, the ways in an interface are purely abstract.
  • A class can implement any number of the interface but can only extend one superclass. Whereas interface can reach any number of interfaces but cannot perform any interface.
  • A class can have a constructor defined inside the class to declare the field inside the class, whereas interface doesn't have any constructor defined because there are no field to be initialized.

Ques:- What is the thread in OS?

Ans:- Threads are sometimes called lightweight processes because they have their own stack but can access shared data.

Multiple threads running in a process share: Address space, Heap, Static data, Code segments, File descriptors, Global variables, Child processes, Pending alarms, Signals, and signal handlers.

Each thread has its own: Program counter, Registers, Stack, and State.


Ques:- What is a process? What are the different states of a process?

Ans:- The process is basically a program that is currently under execution. The main function of an OS is to manage and handle all of these processes. On batch systems, it is called a "job" while on time-sharing systems, it is called a "task". When a program is loaded into the memory and it becomes a process, it can be divided into four sections- stack, heap, text, and data.

There are two types of processes:

Operating System Processes

  • User Processes
  • States of Process

Different states of the process through which process goes are given below:

  • New State: In this state, a process is just created.
  • Running: In this state, the CPU starts working on the process's instructions.
  • Waiting: In this state, the process cannot run because it just waits for some event to occur.
  • Ready: In this state, the process has all resources available that are required to run but it waits to get assigned to a processor because CPUs are not working currently on instructions passed by the process.
  • Terminate: In this state, the process is completed i.e., the process has finished execution.

Ques:- What do you mean by Semaphore in OS? Why is it used?

Ans:- 

  • Semaphore is a signaling mechanism. It only holds one positive integer value. It is simply used to solve the problem or issue of critical sections in the synchronization process by using two atomic operations i.e., wait() and signal().
  • A semaphore is a hardware or a software tag variable whose value indicates the status of a common resource.
  • Its purpose is to lock the common resource being used. A process that needs the resource will check the semaphore to determine the status of the resource followed by the decision for proceeding.
  • In multitasking operating systems, the activities are synchronized by using the semaphore techniques.

Types of Semaphore

There are usually two types of semaphores as given below:

  1. Binary Semaphore: Binary semaphores are much faster as compared to Mutex.
  2. Counting Semaphore: Mutex is slower as compared to binary semaphores.

Ques:- What is thrashing in OS?

Ans:- It is generally a situation where the CPU performs less productive work and more swapping or paging work. It spends more time swapping or paging activities rather than its execution. It occurs when the process does not have enough pages due to which the page-fault rate is increased. It inhibits much application-level processing that causes computer performance to degrade or collapse.


Ques:- Explain the zombie process?

Ans:-  Zombie process, referred to as a defunct process, is basically a process that is terminated or completed but the whole process control block is not cleaned up from the main memory because it still has an entry in the process table to report to its parent process. It does not consume any of the resources and is dead, but it still exists. It also shows that resources are held by process and are not free. 

It happens when the parent process has terminated while the child process is still running. The child process now stays as a zombie.


Ques:- What do you mean by FCFS?

Ans:-  FCFS (First Come First Serve) is a type of OS scheduling algorithm that executes processes in the same order in which processes arrive. In simple words, the process that arrives first will be executed first. It is non-preemptive in nature. FCFS scheduling may cause the problem of starvation if the burst time of the first process is the longest among all the jobs. Burst time here means the time that is required in milliseconds by the process for its execution. It is also considered the easiest and simplest OS scheduling algorithm as compared to others. Implementation of FCFS is generally managed with the help of the FIFO (First In First Out) queue.


Ques:- What is a Scheduling Algorithm?

Ans:-  A scheduling algorithm is a process that is used to improve efficiency by utilizing maximum CPU and providing minimum waiting time to tasks. It simply deals with the problem of deciding which of outstanding requests is to be allocated resources. It is used to allocate resources among various competing tasks.

Examples - First Come First Serve, Multilevel Queue Scheduling, Priority Scheduling, Round Robin Scheduling, Shortest Job First, Shortest Remaining Time.


Ques:- What is a copy constructor in JAVA?

Ans:-  Copy constructor is a member function that is used to initialize an object using another object of the same class. Though there is no need for a copy constructor in Java since all objects are passed by reference. Moreover, Java does not even support automatic pass-by-value.


Ques:- What is a Marker Interface in JAVA?

Ans:-  A Marker interface can be defined as the interface having no data member and member functions. In simpler terms, an empty interface is called the Marker interface. The most common examples of Marker interfaces in Java are Serializable, Cloneable, etc.

The marker interface can be declared as follows:

public interface Serializable{

}


Ques:- Why pointers are not used in JAVA?

Ans:- Java doesn't use pointers because they are unsafe and increases the complexity of the program. Since Java is known for its simplicity of code, adding the concept of pointers will be contradicting. Moreover, since JVM is responsible for implicit memory allocation, thus in order to avoid direct access to memory by the user, pointers are discouraged in Java.


Ques:- Why JAVA is platform-independent?

Ans:- Java is called platform independent because of its byte codes which can run on any system irrespective of its underlying operating system.


Ques:- What are wrapper classes in Java?

Ans:- Wrapper classes convert the Java primitives into the reference types (objects). Every primitive data type has a class dedicated to it. These are known as wrapper classes because they "wrap" the primitive data type into an object of that class. Refer to the below image which displays the different primitive types, wrapper class, and constructor arguments.


Ques:- What is executeUpdate in JDBC?

Ans:- Statement executeUpdate (String query) is used to execute Insert/Update/Delete (DML) statements or DDL statements that returns nothing. The output is int and equals to the row count for SQL Data Manipulation Language (DML) statements. For DDL statements the output is 0.


Ques:- What is a critical section?

Ans:- It is a section of code that can be executed only by one process at a time.


Ques:- What is Mutex?

Ans:- 

  • Mutex- 'Mutual Exclusion Lock' is a lock that protects access to the shared data resources.
  • Threads can create and initialize a mutex to be used later.
  • Before entering a critical region the mutex is locked. It is unlocked after exiting the critical region. If any thread tries the lock the mutex during the time, it can't do so.

Ques:- What is synchronization? What are the different synchronization mechanisms?

Ans:- Synchronization means controlling access to a resource that is available to two or more threads or processes. Different synchronization mechanisms are:

  • Mutex
  • Semaphores
  • Monitors
  • Condition variables
  • Critical regions 
  • Read/ Write locks

Ques:- What are the advantages of multiprocessor system?

Ans:- 

  • Increased Throughput: Multiprocessor systems have better performance than single-processor systems.
  • Reduced Cost: Multiprocessor systems can cost less than equivalent multiple single-processor systems.
  • Increased reliability: Multiprocessor systems have more than one processor, so if one processor fails, the complete system will not stop.

Ques:- What is a deadlock? Is it possible to have a deadlock involving only one process?

Ans:- 

  • It is a condition where a group of two or more waiting for the resources currently in use by other processes of the same group.
  • In this situation, every process is waiting for an event to be triggered by another process of the group.
  • Since no thread can free up the resource a deadlock occurs the application hangs.

Deadlock with one process is not possible. Here is the explanation.

A deadlock situation can arise if the following four conditions hold simultaneously in a system.

- Mutex Exclusion.

- Hold and Wait.

- No Preemption

- Circular-wait.


Ques:- What is a Kernel?

Ans:- 

  • A kernel is the part of the OS which handles all details of sharing resources and device handling.
  • It can be considered as the core of OS which manages the features of an OS.
  • Its purpose is to handle the communication between software and hardware.
  • Its services are used through system calls.
  • A layer of software called shell wraps around the Kernel.

Ques:- What is Inheritance, Aggregation, and Composition?

Ans:- 

  • Inheritance is said to be there between two classes when one class inherits or gets some default features (attributes and functions) coming from the other class. For example, if we have a class Animal with some defined functions like walk(), see(), reproduce(), etc., then class Herbivorous can inherit the class Animal and get all those functions and can define some of its own.
  • Aggregation is said to be there when one class has a member variable that is of some other user-defined class type. For example, if we have a class BankAccount to store information of bank accounts and we have a class Employee for employees, where,

class Employee

- String name

- Integer employeeid

- BankAccount accountinfo

  • The composition can be described as when one class which includes another class, is dependent on it in such a way that it cannot functionally exist without the class which is included. For Example, if we have an Engine class and a Car class including Engine class in it. Then functionally if the engine is required for the car to work, if we remove it, the car will stop working. Hence it's a case of Composition.

Ques:- Why Java doesn't support multiple Inheritance?

Ans:- The reason behind this is to prevent ambiguity. Consider a case where class B extends class A and class C and both classes A and class C has the same method "display()". Now Java compiler can't decide, which display method it should inherit. To prevent such situations, multiple inheritances are not allowed in Java.


Ques:- Why are string objects immutable in Java?

Ans:- Because Java uses the concept of string literal. Suppose there are 2 reference variables, all refer to one object "Hello". If one reference variable changes the value of the object, it will affect the other reference variable. Also, String class in Java is final.


Ques:- Describe the usage of the final keyword in Java?

Ans:- final keyword is used with variables when the value of the variable is not going to change and is going to remain constant. When the final keyword is used with methods, then they can't be overridden in the derived class. The final keyword is used with the class to prevent the class from being subclassed when writing APIs or libraries so that the base behavior is not altered.


Ques:- Why can't static methods call non-static methods?

Ans:- A static method is not tied to any object/instance of the class, while a non-static method always refers to an actual object/instance of the class. It is to be noted that not-static methods can access any static methods/variables without creating an instance of the class because the static method/variable belongs to the class.


Ques:- what do you mean by static?

Ans:- static is a keyword used for a constant variable or a method that is the same for every instance of the class.


Ques:- What are proxies?

Ans:- A proxy is an address (IP address) of a server (Proxy server) that is placed between your computer and the Internet.

The advantage of a proxy is that your real Ip address is hidden. So when you hack, you are giving the IP address of the proxy server and not your real IP address. Same way if you are a normal Internet user, the hacker won't get your real IP but the IP of the proxy server. You can use it to enter site or forum in which your IP is banned.


Ques:- what is the refresh rate?

Ans:- The refresh rate is the number of times a display's image is repainted or refreshed per second. The refresh rate is expressed in hertz so a refresh rate of 75 means the image is refreshed 75 times in a second. The refresh rate for each display depends on the video card used.


Ques:- what Static RAM and Dynamic RAM?

Ans:- 

  • SRAM (Static RAM) is Random Access Memory (RAM) that retains data bits in its memory as long as power is being supplied. Unlike dynamic RAM (DRAM), which stores bits in cells consisting of a capacitor and a transistor, SRAM does not have to be periodically refreshed. Static RAM provides faster data and is more expensive than DRAM. SRAM is used for a computer's cache memory and as part of the random access memory digital-to-analog converter on a video card.
  • DRAM (Dynamic RAM) is Random Access Memory (RAM) is a type of semiconductor memory that is typically used for the data or program code needed by a computer processor to function. DRAM is a common type of random access memory (RAM) that is used in personal computers (PCs), workstations, and servers. Random access allows the PC processor to access any part of the memory directly rather than having to proceed sequentially from a starting place. RAM is located close to a computer's processor and enables faster access to data than storage media such as hard disk drivers and solid-state drivers.

Ques:- Describe Main memory and Secondary memory storage?

Ans:- Main memory is also called random access memory (RAM). CPU can access Main memory directly. Data access from the main memory is much faster than secondary memory.

Secondary memory can stores a large amount of data and programs permanently. Magnetic disk is the most common secondary storage device. If a user wants to execute any program it should come from secondary memory to main memory because the CPU can access main memory directly.


Ques:- Describe Hub, Switch, and Router?

Ans:- 

  • Hub: Hub will broadcast all data to every port. It has a common connection point for all devices.
  • Switch: Switch will create the dynamic connection and provide information to the requesting port.
  • Router: The router is the device that will be responsible for forwarding data packets.

Ques:- What do you mean by HTTP?

Ans:- HTTP stands for HyperText Transfer Protocol and the port for this is 80. This protocol is responsible for web content.


Ques:- What do you mean by TCP and UDP?

Ans:- TCP stands for Transfer Control Protocol and UDP stands for User Datagrams Protocol and TCP is a connection-oriented protocol and UDP is a Connectionless protocol.


Ques:- What do you mean by Firewall?

Ans:- Firewall is a concept of a security system that will help computers protect themselves from unauthorized access or any cyber-attack. You can implement a firewall in either hardware or software form, or a combination of both. Firewalls prevent unauthorized Internet users from accessing private networks connected to the internet, especially intranets. 

It is a security system designed for the network. A firewall is set on the boundaries of any system or network which monitors and controls network traffic. 

Firewalls are mostly used to protect the system or network traffic. Firewalls are mostly used to protect the system or network from malware, worms, and viruses. Firewalls can also prevent content filtering and remote access.


Ques:- What do you mean by DNS?

Ans:- DNS stands for Domain Name System. It's an internet address mapping process with the local name. We can also call it an internet phonebook. A DNS server is a computer server that contains a database of public IP addresses and their associated hostnames, and in most cases serves to resolve, or translate, those names to IP addresses as requested.


Ques:- Explain DHCP?

Ans:- DHCP (Dynamic Host Configuration Protocol) is a network management protocol used on Internet Protocol networks whereby a DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network so they can communicate with another IP network.


Ques:- How does the Internet work?

Ans:- Because the Internet is a global network of computers each computer connected to the Internet must have a unique address. Internet addresses are in the form nnn.nnn.nnn.nnn where nnn must be a number from 0 to 255. This address is known as an IP address. (IP stands for Internet Protocol).

If you connect to the internet through an Internet Service Provider (ISP), you are usually assigned a temporary IP address for the duration of your dial-in session. If you connect to the Internet from a local area network (LAN) your computer might have a permanent IP address or it might obtain a temporary one from a DHCP (Dynamic Host Configuration Protocol) server. In any case, if you are connected to the Internet, Your computer has a unique IP address.


Ques:- What is a Processor?

Ans:-  An important feature to note on your motherboard is the socket used to hold the CPU. Different types of socket connections are found over various boards, each having varied configurations for the processor pins.

This socket will determine the physical packaging of the processor that can be installed on it. In addition to this, the motherboards chipset will determine what specific model processors can be used with the motherboard.


Ques:- What is a Motherboard?

Ans:- A motherboard is the spine of your PC, it is the link between all the different components inside your computer. One of the major functions of a motherboard is to act as the "hub" to which other computer devices connect. A board can come in many formations to fit different needs, budgets and speeds.

The motherboard itself is a printed circuit board that allows the CPU, RAM, and all other computer hardware components to communicate with each other. There are huge variations in Motherboards from design, cases, power supply, size (Form Factor), and compatibility.


Ques:- What is GPU?

Ans:- GPU stands for Graphics Processing Unit. It's the brain of the graphics card and is what creates the visuals you see on the screen. How powerful those GPUs are will vary on the model you select.

The GPU works as a translator, it takes data coming from the CPU and transforms it into imagery. More complex visuals, like you find in high-definition games require more complex and quicker GPUs to accommodate the stream of data.


Ques:- What is Multi-Threading?

Ans:- Multithreading is a programming concept to run multiple tasks in a concurrent manner within a single program. Threads share the same process stack and running in parallel. It helps in the performance improvement of any program.


Ques:- Can we call the constructor of a class more than once for an object?

Ans:- Constructor is called automatically when we create an object using a new keyword. It's called only once for an object at the time of object creation and hence, we can't invoke the constructor again for an object after its creation.


Ques:- What's the difference between an array and Vector?

Ans:- An array groups data of the same primitive type and is static in nature while vectors are dynamic in nature and can hold data of different data types.


Ques:- Is String a data type in java?

Ans:- String is not a primitive data type in java. When a string is created in java, it's actually an object of Java.Lang.String class that gets created.


Ques:- How can we pass an argument to a function by reference instead of pass by value?

Ans:- In java, we can pass an argument to a function only by value and not by reference.


Ques:- Can a class have multiple constructors?

Ans:- yes, a class can have multiple constructors with different parameters.


Ques:- What is a Class Variable?

Ans:- These are variables declared within a class, outside any method, with the static keyword.


Ques:- What is a Volatile keyword?

Ans:- A volatile variable is one that can change unexpectedly. This means the compiler can not make assumptions about its value. A volatile keyword prevents the compiler to perform any optimization on that object, that can change in ways that the compiler cannot determine. Where object can be memory, register, SFR which can be updated by interrupts, DMA, External inputs (such as a keypad, keyboard, touch screening). Say we have a memory location and we need to continuously monitor it until it becomes non-zero.

Example -

#define Address 0x1000U

int main(){

int val=0;

volatile int *p=(int *) Address;

while(1)

{

value=*p;

if(value)

break;

}

}

This code (exclude letter in green) works fine if there is no optimization done by the compiler it will always go and read value pointed by pointer p.

But if you applied compiler optimization and the value is updated by interrupts or DMA, which is not under compiler scope. Then compiler optimize is by keeping a copy of its first read.

In that case, even if the value at that address changes it will never be updated here. To avoid such a situation we have to explicitly tells the compiler that the pointer is volatile and don't perform any optimization on that.

 


Ques:- What is Namespace in C++?

Ans:- Namespace allows us to group a set of global classes, objects, and/or functions under a specific name.


Ques:- Explain the two types of scope in C++?

Ans:- 

  • Local Scope: A variable is said to have a local scope or is local when it is declared inside a code block. The variable remains active only inside the block and is not accessible outside the code block.
  • Global Scope: A variable has a global scope when it is accessible throughout the program. A global variable is declared on top of the program before all the function definitions.

Ques:- Difference between Declaration and Definition of a variable in C++?

Ans:- 

  • The Declaration of a variable is merely specifying the data type of a variable and the variable name. As a result of the declaration, we tell the compiler to reserve the space for a variable in the memory according to the data type specified.
  • A Definition is an implementation/instantiation of the declared variable where we tie up appropriate value to the declared variable so that the linker will be able to link references to the appropriate entities.


Ques:- What are Virtual Functions in C++?

Ans:- Virtual functions are used with inheritance, they are called according to the data type of the object pointed or referred to, not according to the type of pointer or reference. In other words, virtual functions are resolved late, at runtime. The virtual keyword is used to make a function virtual.


Ques:- What Is Exception Handling in C++?

Ans:- When an exception has occurred, the compiler has to throw it so that we know an exception has occurred. When an exception has been thrown, the compiler has to ensure that it is handled properly, so that the program flow continues or terminates properly. This is called the handling of an exception.


Ques:- What Is NULL pointer in C

Ans:- NULL is used to indicate that the pointer doesn't point to a valid location. Ideally, we should initialize pointers as NULL if we don't know their value at the time of declaration.


Ques:- What is a memory leak? why it should be avoided in C?

Ans:- Memory leak occurs when programmers create a memory in heap and forget to delete it. Memory leaks are particularly serious issues for programs like daemons and servers which by definition never terminate.


Ques:- Can a program be compiled without main() Function in C?

Ans:- yes, it can be but cannot be executed, as the execution required main() function definition.


Ques:- What is recursion in C?

Ans:- When a function calls itself, and this process is known as recursion. The function that calls itself is known as a recursive function.


Ques:- What is the difference between getch() and getche() function in C?

Ans:- 

  • getch() function reads a single character from the keyboard. It doesn't use any buffer, so entered data will not be displayed on the output screen.
  • getche() function reads a single character from the keyword, but data is displayed on the output screen. Press Alt+F5 to see the entered character.

Ques:- Explain the concept of ACID properties in DBMS?

Ans:- ACID properties are a combination of Atomicity, Consistency, Isolation, and Durability properties. These properties prove to be very helpful in allowing a safe and secure way of sharing the data amongst multiple users.


Ques:- What is the use of DBMS?

Ans:- DBMS is also known as Database Management System. It is an application system where its main purpose is to revolve around data. This allows its user to store the data, define it, retrieve it and update the information about the data inside the database. 


Ques:- What is the use of IP address?

Ans:- An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participation in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing.


Ques:- What is the difference between UNIQUE and PRIMARY key constraints?

Ans:- A UNIQUE constraint is similar to PRIMARY key, but you can have more than one UNIQUE constraint per table. Contrary to PRIMARY key UNIQUE constraints can accept NULL but just once. If the constraint is defined in a combination of fields, then every field can accept NULL and can have some values on them, as long as the combination values are unique.


Ques:- What is the property of a class?

Ans:- A property is a member that provides access to an attribute of an object or a class. Examples of properties include the length of a string, the size of a font, the caption of a window, the name of a customer, and so on.


Ques:- Can you give an example of a Stored Procedure?

Ans:- CREATE procedure - is a stored procedure, which is a saved collection of Transact-SQL statements that can take and return user-supplied parameters.


Ques:- What is the Program counter?

Ans:- Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi-byte instruction, which has not been completely fetched. In both cases, it gets incremented automatically one by one as the instruction bytes get fetched.


Ques:- Is XML case-sensitive?

Ans:- XML is case sensitive when uppercase and lowercase characters are treated differently. Element type names, Attribute names, Attribute values, All general and parameter entity names, and data content (text) is case-sensitive.


Ques:- What is DOM?

Ans:- The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Objects in the DOM tree may be addressed and manipulated by using methods on the objects.


Ques:- What do you mean by Stack unwinding?

Ans:- It is a process during exception handling when the destructor is called for all local objects between the place where the exception was thrown and where it is caught.


Ques:- How does Wi-Fi work?

Ans:- Wi-Fi uses radio frequencies to send signals between devices. The frequencies are different from other devices like a cell phone. Your router distributes the frequencies to other devices near it. This will allow you to connect to them as long as you are receiving them.

The implementation is done at Layer 1 (Physical layer) of the OSI model.

Then your data usage is sent to the router. The router sends over the data to specific places using an IP address. An IP address allows the router to send data to the correct location like YouTube, which is 208.65.153.238. They can change though!


Ques:- What is FPS (Frames Per Second)?

Ans:- FPS is a measure of how many full screen, still images are captured or displayed in one second of video recording/playback or video gameplay. In videography and video gaming alike, the quick succession of still images is used to create the illusion of motion; The higher the FPS, the smoother the motion appears. In general, the standard minimum Frames Per Second needed to maintain realistic motion is 24 FPS. While a high FPS (60+) makes animation appear more realistic and can improve the appearance of slow motion effects, it can also create an unreasonably large file size and cause playback to lag.


Ques:- Explain API (Application Program Interface)?

Ans:- An API is a set of rouitnes, protocols, and tools for building software applications. Basically, an API specifies how software components should interact. Additionally, APIs are used when programming Graphical User Interface (GUI) components.


Ques:- What is Data Science?

Ans:- Data science is the study of data. It involves developing methods of recording, storing, and analyzing data to effectively extract useful information. The goal of data science is to gain insights and knowledge from any type of data - both structured and unstructured.


Ques:- What is Big Data?

Ans:- 

  • Simply, big data is larger, more complex data sets, especially from new data sources.
  • These data sets are so voluminous that traditional data processing software just can't manage them.
  • But, these massive volumes of data can be used to address business problems you wouldn't have been able to tackle before.

Ques:- What is does CAPTCHA mean?

Ans:- CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Human Apart. In other words, CAPTCHA determines whether the user is real or a spam robot. CAPTCHAs stretch or manipulate letters and numbers, and rely on human ability to determine which symbols they are.


Ques:- What is Internet of Things (IoT)?

Ans:- The Internet of Things (IoT) Explained: Simply and Non-Technically

  • How are you reading this post right now? It might be on desktop, on mobile, maybe a tablet, but whatever device you're using, it's most definitely connected to the internet.
  • The Internet of Things is actually a pretty simple concept, it means taking all the things in the world and connecting them to the internet.

Ques:- What is a Honeypot?

Ans:- 

  • Honeypot is a security mechanism. Honeypots are kind of traps, e.g A server that looks like an organizations real server and appears to contain useful information to attackers but in fact this server (Honeypot) is monitored heavily.
  • Hackers hack honeypots and get trapped, Security analysts on the other hand get to know the weak points in their infrastructure and security.

Ques:- What is 127.0.0.1?

Ans:- 

  • The IP address 127.0.0.1 is a special-purpose IPv4 address called localhost or loopback address. All computers use this address as their own but it doesn't let them communicate with other devices as a real IP address does.
  • The loopback address is only used by the computer you're on, and only for special circumstances - unlike a regular IP address that is used to transfer files to and from other networked devices. For example, a web server running on a computer can point to 127.0.0.1 so that the pages can be run locally and tested before it's deployed.

Ques:- What is Debugging?

Ans:- The process of finding and fixing bugs called Debugging. A bug refers to an error, fault or flow in any computer program or a hardware system. A bug produces unexpected results or causes a system to behave unexpectedly.

In short it is any behavior or result that a program or system gets but it was not designed to do.


Ques:- What is TOR Browser?

Ans:- 

  • TOR is short for The Onion Router and was initially a worldwide network of servers developed with U.S Navy tat enabled people to browse the internet anonymously.
  • The Tor network disguises your identity by moving your traffic across different Tor servers, and encrypting that traffic so it isn't traced back to you.
  • Anyone who tries would see traffic coming from random nodes on the Tor network, rather than your computer.

Ques:- What is Web Hosting?

Ans:- When you make a website and want other people to see it, you will need to publish it with a web hosting service. Web hosting is a service that allows organizations and individuals to post a website or web page on to the internet. A web host, or web hosting service provider, is a business that provides the technologies and services needed for the website or webpage to be viewed in the Internet. Website is hosted or stored, on special computers called servers.


Ques:- Describe the types of Data Structures?

Ans:- Data Structures are mainly classified into two types:

  • Linear Data Structure: A data structure is called linear if all of its elements are arranged in sequential order. In linear data structures, the elements are stored in a non-hierarchical way where each item has successors and predecessors except the first and last elements.
  • Non-Linear Data Structure: 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.

Ques:- What is a Stack?

Ans:- Stack is an ordered list in which, insertion and deletion can be performed only at one end that is called the top. It is a recursive data structure having a pointer to its top element. The stack is sometimes called a Last-In-First-Out (LIFO) list i.e. the element which is inserted first in the stack will be deleted last from the stack.

List the area of applications where stack data structure can be used?

  • Expression evaluation
  • Backtracking
  • Memory Management
  • Function calling and return

Ques:- What are the operations that can be performed on a stack?

Ans:- 

  • Push Operations
  • Pop Operations
  • Peek Operations

Ques:- What is the difference between PUSH and POP?

Ans:- PUSH and POP operations specify how data is stored and retrieved in a stack.

  • PUSH: PUSH specifies that data is being "inserted" into the stack.
  • POP: POP specifies data retrieval. It means that data is being deleted from the stack.

Ques:- Write the steps involved in the insertion and deletion of an element in the stack?

Ans:- Push:

  • Increment the variable top so that it can refer to the next memory allocation.
  • Copy the item to the array index value equal to the top.
  • Repeat steps 1 and 2 

Pop: 

  • Store the topmost element into another variable.
  • Decrement the value of the top
  • Return the topmost element

Ques:- Define Linked List Data structure?

Ans:- Linked List is the collection of randomly stored data objects called nodes. In Linked List, each node is linked to its adjacent node through a pointer. A node contains two fields. i.e. Data Field and Link Field.


Ques:- Are linked lists considered linear or non-linear data structures?

Ans:- A linked list is considered both linear and non-linear data structure depending upon the situation.

  • On the basis of data storage, it is considered a non-linear data structure.
  • On the basis of the access strategy, it is considered as a linear data-structure.

Ques:- Define DBMS?

Ans:- DBMS stands for Database Management System. It is a collection of application programs that allow the user to organize, restore and retrieve information about data efficiently and as effectively as possible.

Some of the popular DBMS's are MySql, Oracle


Ques:- What is RDBMS?

Ans:- RDBMS stands for Relational Database Management System.

RDBMS stores the data into the collection of tables, which is related by common fields between the columns of the table. It also provides relational operators to manipulate the data stored in the tables.

Example: SQL Server.


Ques:- What is SQL?

Ans:- SQL stands for Structured Query Language, and it is used to communicate with the Database. This is a standard lanugae used to perform tasks such as retrieval, updation, insertion and deletion of data from a database.

Standard SQL Commands are Select.


Ques:- What is a primary key?

Ans:- A primary key is a combination of fields which uniquely specify a row. This is a special kind of unique key, and it has implicit NOT NULL constraint. It means, Primary key values cannot be NULL.


Ques:- What is a unique key?

Ans:- A unique key constraint uniquely identified each record in the database. This provides uniqueness for the column or set of columns. A primary key constraint has automatic unique constraint defined on it. But not, in the case of Unique Key. 

There can be many unique constraint defined per table, but only one Primary key constraint defined per table.


Ques:- What is a foreign key?

Ans:- A foreign key is one table which can be related to the primary key of another table. Relatinship needs to be created between two tables by referencing foreign key with the primary key of another table.


Ques:- What is a join?

Ans:- This is a keyword used to query data from name tables based on the relationship between the fields of the tables. Keys play a major role when JOINs are used.


Ques:- What is normalization?

Ans:- Normalization is the process of minimizing redundancy and dependency by organizing fields and table of a database. Normalization is process of organizing data in a database efficiently. Two goals of the normalization processes are: to eliminate redundant data (for example, storing the same data in more than one table) and also ensure data dependencies make sense (only storing related data in a table). These both are important as they reduce the amount of space a database consumes and ensure that data is logically stored. The main aim of Normalization is to add, delete or modify field that can be made in a single table.


Ques:- What is Denormalization?

Ans:- DeNormalization is a technique used to access the data from higher to lower normal forms of database. It is also process of introducing redundancy into a table by incorporating data from the related tables.


Ques:- What are all the different normalizations?

Ans:- The normal forms can be divided into 5 forms, and they are explained below -

  • First Normal Form (1NF): This should remove all the duplicate columns from the table. Creation of tables for the related data and identification of unique columns.
  • Second Normal Form (2NF): Meeting all requirements of the first normal form. Placing the subsets of data in separate tables and Creation of relationships between the tables using primary keys.
  • Third Normal Form (3NF): This shluld meet all requirements of 2NF. Removing the columns which are not dependent on primary key constraingts.
  • Fourth Normal Form (4NF): Meeting all the requirements of third normal form and it should not have multi-valued dependcies.

Ques:- What is a relationship and what are they?

Ans:- Database Relationship is defined as the connection between the tables in a database. There are various data basing relationships, and they are as follows:

  • One to One Relationship.
  • One to Many Relationship
  • Many to One Relationship
  • Self-Referencing Relationship

Ques:- What is a stored procedure?

Ans:- Stored Procedure is a function consists of many SQL statement to access the database system. Several SQL statements are consolidated into a soterd procedure and execute them whernever and wherever required.


Ques:- What is a trigger?

Ans:- A DB trigger is a code or programs that automatically execute with respones to some event on a talbe or view in a database. Mainly, trigger helps to maintain the integrity of the database.

Example: When a new student is addes to the student database, New records should be createcd in the related tables like Exam, Score and Attendance tables.


Ques:- Compare overloading with overriding?

Ans:- Overloading refers to the case of having two methods of the same name but different properties; whereas, overriding occurs when there are two methods of the same name and properties, but one is in the child class and the other is in the parent class.


Ques:- How can we restric inheritance for a class?

Ans:- 

  • By using the final keyword
  • If we make all methods final, then we cannot override that
  • By usig private constructors
  • By using the javadoc comment ("//")

Ques:- What are the advantages of JSON over XML?

Ans:- 

  • JSON is lighter and faster than XML.
  • It is easily understandable.
  • It is easy to parse and convert to objects for information consumption.
  • JSON supports multiple data types-string, number, array, or Boolean- but XML data are all string.

Ques:- What's the base class of all exception classes?

Ans:- Java.lang.throwable: It is the superclass of all exception classes, and all exception classes are derived from this base class.


Ques:- Why do we use a vector class?

Ans:- A vector class provides the ability to execute a growable array of objects. A vector proves to be very useful if you don't know the size of the array in advance of if we need one that can change the size over the lifetime of a program.


Ques:- Which API is provided by Java for operations on a set of objects?

Ans:- Java provides a collection API that provides many useful methods, which can be applied to a set of objects. Some of the important classes provided by the collection API include ArrayList, HashMap, TreeSet, and TreeMap.


Ques:- What is the default size of the load factor in the hasing-based collection?

Ans:- Default size = 0.75

Default capacity = initial capacity * load factor


Ques:- What is a postfix expression?

Ans:- An expression in which operators follow the operands is known as postfix expression. The main benefit of this form is that there is no need to group sub-expressions in parentheses or to consider operator precedence. The expression "a + b" will be represented as "ab+" in postfix notation.


Ques:- Explain the functionality of linked list?

Ans:- A linked list consists of two parts: information and the link. In the single connected listening, the beginning of the list is marked by a unique pointer named start. This pointer does point to the first element of the list and the link part of each node consists of an arrow looking to the next node, but the last node of the list has null pointer identifying the previous node. With the help of start pointer, the liked list can be traversed easily.


Ques:- What is software development life-cycle?

Ans:- Software development life-cycle is steps involved in the life cycle of software development phase. Generally, it is followed by the development team which develops the software in the organization. It consists of a clear explanation of developing and maintaining the software.


Ques:- Differentiate between JDK, JRE, and JVM?

Ans:- 

  • JVM (Java Virtual Machine): JVM provides the runtime environment for Java bytecodes to be executed.
  • JRE (Java Runtime Environment): JRE includes the sets of files required by JVM during runtime.
  • JDK (Java Development Kit): JDK consists of JRE along with the development tools required to write and execute a program.

Ques:- Can we execute any code, even before the main method?

Ans:- Yes, we can execute any code, even before the main method. We will be using a static block of code in the class when creating the objects at load time of the class. Any statements within this static block of code will get executed at once while loading the class, even before the creation of objects in the main method.


Ques:- What is cybersecurity?

Ans:- Cybersecurity refers to the protection of hardware, software, and data from attackers. The primary purpose of cybersecurity is to protect against cyberattacks like accessing, changing, or destroying sensitive information.


Ques:- What are the elements of cybersecurity?

Ans:- Major elements of cybersecurity are:

  • Information security
  • Network security
  • Operational security
  • Application security
  • End-user education
  • Business continuity planning

Ques:- What are the advantage of cybersecurity?

Ans:- Benefits of cybersecurity are as follows:

  • It protects the business against ransomware, malware, social engineering, and phishing.
  • It protects end-users.
  • It gives good protection for both data as well as the network.
  • Increase recovery time after a breach.
  • Cybersecurity prevents unauthorized users.

Ques:- Define Cryptography?

Ans:- It is a technique used to protect information from third parties called adversaries. Cryptography allows the sender and recipient of a message to read its details.


Ques:- Differentiate between IDS and IPS?

Ans:- Intrusion Detection System (IDS) detects intrusions. The administrator has to be careful while preventing the Intrusion Prevention System (IPS), the system finds the intrusion and prevents it.


Ques:- What is the CIA?

Ans:- Confidentiality, Integrity, and Availability (CIA) is a popular model which is designed to develop a security policy. CIA model consists of there concepts:

  • Confidentiality: Ensure the sensitive data is accessed only by an authorized user.
  • Integrity: Integrity means the information is in the right format.
  • Availability: Ensure the data and resources are available for users who need them.

Ques:- Explain Traceroute?

Ans:- It is a tool that shows the packet path. It lists all the points that the packet passes through. Traceroute is used mostly when the packet does not reach the destination. Traceroute is used to check where the connection breaks or stops or to identify the failure.


Ques:- Explain SSL?

Ans:- SSL stands for Secure Sockets Layer. It is a technology creating encrypted connections between a web server and a web browser. It is used to protect information and digital payments to maintain data privacy.


Ques:- What are the different data types present in C++?

Ans:- The 4 data types in C++ are givne below:

  • Primitive Datatype (basic datatype). Example- char, short, int, float, long, double, bool, etc
  • Derived datatype. Example- array, pointer, etc.
  • Enumeration. Example- enum
  • User-defined data types. Example- structure, class, etc.

Ques:- What are the C++ access specifiers?

Ans:- 

  • Public: All data members and member functions are accessible outside the class.
  • Protected: All data members and member functions are accessible inside the class and to the derived class.
  • Private: All data members and member functions are not accessible outside the class.
AnonymousBaba

"Facts of Anonymous Baba" are Providing you Best Interesting Facts, Technology Updates, Computer Knowledge, and Their Related Updates.

Post a Comment

Previous Post Next Post