Miscellaneous Articles

Found 71 articles

Difference Between Linear Search and Binary Search

Ravi Ranjan
Ravi Ranjan
Updated on 21-Aug-2025 5K+ Views

A linear search compares the target element with each array element, while a binary search uses divide-and-conquer method to efficiently search for the target element. In this article, we will compare linear search and binary search. What is Linear Search? Linear search is a sequential searching algorithm where we traverse every element within the input array and compare it with the target element to be found. If the target element is found, we return true and the index, and return false if the element is not found in the given array. Below is an animation of working of linear ...

Read More

Difference Between Structure and Class

Ravi Ranjan
Ravi Ranjan
Updated on 15-May-2025 7K+ Views

In C++, both structures (struct) and classes (class) are user-defined data types, where they both give access to group different data elements (variables) and functions together. However, they still possess a few differences between them. In this article, we will see and go through its differences. Structure (struct) The struct is a user-defined data type, which allows the grouping of variables of different data types, with the members being public by default. This is commonly used to represent simple data structures, where encapsulation is not necessary. A struct can contain data members and member functions, but its primary use is ...

Read More

Difference Between int and long

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 05-May-2025 8K+ Views

In programming, int and long are the part of primitive data type. The int stores the integer value while long stores the larger range of values like a whole number. In this article, we will see the differences between int and long data types. int (Integer) Data Type The keyword int representing the integer value. It store the both positive and negative values such as -1, 45, -78, 85, etc., but not fractional and decimal values. The value ranges from –2, 147, 483, 648 to 2, 147, 483, 647. Behavior of int in Different Languages Following is the list of ...

Read More

Difference Between CGI and Servlet

Aishwarya Naglot
Aishwarya Naglot
Updated on 11-Oct-2024 4K+ Views

In this article, we will understand the difference between CGI and servlet. Servlet is a Java class that helps servers to extend their abilities by hosting applications accessed using a request-response model. CGI behaves like middleware between www servers and external databases or information resources, helping pass data between the server and application. Difference between CGI and Servlet Some of the common differences between CGI and Servlet are as follows. S.NO ...

Read More

Silicon Controlled Rectifier – Working Principle and Applications

Manish Kumar Saini
Manish Kumar Saini
Updated on 07-Nov-2023 75K+ Views

An SCR is a three-terminal, three-junction, and four-layer semiconductor device that is used to perform switching functions in power circuits.Sometimes the SCR is also called as Thyristor.Constructional Details of SCRThe SCR has three pn – junctions, and four layer of p and n type semiconductor joined alternatively to get pnpn device. The three terminals are taken – one from outer p – type layer called anode (A), second from the outer n – type layer called cathode (K) and the third from the internal p –type layer called gate (G).Working of SCRIn a SCR, the load is connected in series ...

Read More

Transistor as a Switch

Manish Kumar Saini
Manish Kumar Saini
Updated on 01-Nov-2023 55K+ Views

A transistor can be used as a solid state switch. If the transistor is operated in the saturation region then it acts as closed switch and when it is operated in the cut off region then it behaves as an open switch.The transistor operates as a Single Pole Single Throw (SPST) solid state switch. When a zero input signal applied to the base of the transistor, it acts as an open switch. If a positive signal applied at the input terminal then it acts like a closed switch.When the transistor operating as switch, in the cut off region the current ...

Read More

Inverting and Non-Inverting Operational Amplifiers

Manish Kumar Saini
Manish Kumar Saini
Updated on 01-Nov-2023 93K+ Views

An operational amplifier is a three-terminal device consisting of two high impedance input terminals, one is called the inverting input denoted by a negative sign and the other is the non-inverting input denoted with a positive sign. The third terminal is the output of the Op-Amp.Inverting Operational AmplifierIn the inverting operational amplifier circuit, the signal is applied at the inverting input and the non-inverting input is connected to the ground. In this type of amplifier, the output is 180⁰ out of phase to the input, i.e. when positive signal is applied to circuit, the output of the circuit will be ...

Read More

Difference Between Recursion and Iteration

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 01-Nov-2023 47K+ Views

Recursion and Iteration both repeatedly execute the set of instructions. Recursion occurs when a statement in a function calls itself repeatedly. The iteration occurs when a loop repeatedly executes until the controlling condition becomes false. The basic difference between recursion and iteration is that recursion is a process always applied to a function and iteration is applied to the set of instructions which we want to be executed repeatedly. Read through this article to find out more about Recursion and Iteration and how they are different from each other. What is Recursion? Recursion is defined as a process in which a function calls itself repeatedly. Recursion uses selection structure. If the recursion step does ...

Read More

Unijunction Transistor – Construction, Working Principle, and Characteristic Features

Manish Kumar Saini
Manish Kumar Saini
Updated on 01-Nov-2023 96K+ Views

A Unijunction Transistor (UJT) is a three-terminal semiconductor device. The main characteristics of UJT is when it is triggered, the emitter current increases re-generatively until it is limited by emitter power supply. Due to this characteristic feature, it is used in applications like switching pulse generator, saw-tooth wave generator etc.Construction of UJTThe UJT consists of an n-type silicon semiconductor bar with an electrical on each end. The terminals of these connections are called Base terminals (B1 and B2). Near to base B2, a pn-junction is formed between a p-type emitter and the n-type silicon bar. The terminal of this junction ...

Read More

Average and RMS Value of Alternating Current and Voltage

Manish Kumar Saini
Manish Kumar Saini
Updated on 10-Jun-2021 49K+ Views

Average Value of Alternating QuantityThe arithmetical average of all the instantaneous values of an alternating quantity over one cycle is known as the "Average Value of Alternating Quantity".$$Average\:value=\frac{Sum\:of\:all\:instantaneous\:values\:over\:one\:cycle}{Number\:of\:instants}$$$$=\frac{Total\:are\:under\:the\:curve\:for\:time\:period\:T}{Time\:Period\:(T)} $$$$=\frac{i_{1}+i_{2}+i_{3}+...+i_{n}}{n}$$Average Value of Symmetrical WavesIn case of symmetrical waves like sinusoidal voltage or current, the average value over one cycle is zero. It is because the positive half cycle is exactly equal to the negative half cycle. But the average value of positive or negative half cycle is not zero. Therefore, in case of symmetrical waves, the average value is calculated for half cycle.$$Avg\:value = \frac{Sum\:of\:all\:instantaneous\:values\:over\:half\:cycle}{Number\:of\:instants\:of\:half\:cycle}$$Average Value of Unsymmetrical WaveIn case of ...

Read More
Showing 1–10 of 71 articles
« Prev 1 2 3 4 5 8 Next »
Advertisements