Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
C program to find the unique elements in an array.
In C programming, finding unique elements in an array means identifying elements that appear exactly once. This is a common array manipulation problem that can be solved using nested loops to compare each element with all other elements. Syntax for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(array[i] == array[j] && i != j) break; } ...
Read MoreControlling the Visibility of elements Working with CSS
The CSS visibility property controls whether an element is visible or hidden on a web page. Unlike the display property, visibility: hidden keeps the element's space in the layout while making it invisible. Syntax selector { visibility: value; } Possible Values Value Description visible Default value. Element and its children are visible hidden Element is invisible but still takes up space in layout collapse Used only for table elements. Removes row/column space initial Sets visibility to its default value ...
Read MoreC program for a number to be expressed as a sum of two prime numbers.
In C, we can check if a given positive integer can be expressed as the sum of two prime numbers. This concept is related to Goldbach's conjecture, which states that every even integer greater than 2 can be expressed as the sum of two primes. Syntax int isPrime(int n); // Returns 1 if n is prime, 0 otherwise Algorithm The algorithm to check if a number can be expressed as sum of two primes is − Step 1: Input the number to be checked Step 2: Iterate from i = 2 to ...
Read MoreOrganic Farming
Organic farming is an agricultural system that relies on ecologically based pest controls and biological fertilizers derived from animal and plant wastes, along with nitrogen fixation from special crops. This sustainable farming approach emerged as a response to environmental damage caused by chemical pesticides and synthetic fertilizers used in conventional agriculture. Key Principles of Organic Farming Organic farming operates on fundamental principles that distinguish it from conventional agriculture. It utilizes fewer pesticides, reduces nitrate leaching into water systems, minimizes soil erosion, and recycles animal wastes as compost. While these benefits contribute to environmental sustainability, they often result in ...
Read MoreC program to find the solution of linear equation
We can apply the software development method to solve the linear equation of one variable in C programming language. A linear equation of the form ax + b = 0 can be solved by rearranging to find x = -b/a (provided a ≠ 0). Syntax float solve(float a, float b); x = -b / a; // where a != 0 Requirements The equation should be in the form of ax + b = 0 a and b are inputs, we need to find the value of x Handle the case where a ...
Read MoreDisplay None Using in CSS
CSS display: none is used to completely hide an element from the webpage. When an element has display: none, it is removed from the document flow and takes up no space on the page. The element and all its child elements become invisible and are not rendered by the browser. Syntax selector { display: none; } Key Characteristics Element is completely removed from the document flow Takes up no space on the page Child elements are also hidden, regardless of their display property Different from visibility: hidden, which hides ...
Read MoreC program to replace all zeros with one in a given integer.
In C programming, replacing all zeros with ones in an integer requires digit-by-digit processing. This can be achieved using recursion or iterative approaches to extract, modify, and reconstruct the number. Syntax int replaceZeros(long int number); Algorithm Follow these steps to replace all zeros with ones in an integer − Step 1 − Input the integer from the user Step 2 − Traverse the integer digit by digit Step 3 − If a zero is encountered, replace it with one Step 4 − Reconstruct and return the modified number Method 1: ...
Read MoreOccupational Structure
Occupational structure refers to the distribution of a country's workforce across different types of economic activities and professions. It shows how the population is engaged in various sectors like agriculture, manufacturing, and services. Understanding occupational structure helps analyze a nation's economic development level and workforce utilization patterns. Types of Occupational Sectors Occupations are broadly classified into three main sectors based on their nature and development stage: Primary Sector − Includes agriculture, fishing, forestry, mining, and animal husbandry. These are basic economic activities that extract natural resources directly. Secondary Sector − Comprises manufacturing, construction, and processing industries ...
Read MoreWorking with Display Block in CSS
The CSS display: block property makes an element behave as a block-level element, taking up the full width of its parent container and starting on a new line. Block elements stack vertically and can have width, height, margins, and padding applied on all sides. Syntax selector { display: block; } Default Block Elements Elements like , , , , and are block-level by default. You can also convert inline elements to block elements using the display property. Example: Converting Inline to Block The following example converts an ...
Read MoreC program to compare the structure variables
In C programming language, a structure is a collection of different datatype variables, which are grouped together under a single name. While C doesn't provide a built-in operator to compare entire structures directly, we can compare structure variables by comparing their individual members. Syntax struct tagname { datatype member1; datatype member2; datatype membern; }; Structure Declaration and Initialization The general form of a structure declaration is as follows − struct tagname { datatype member1; ...
Read More