
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

4K+ Views
An array is a group of related items that store with a common name.SyntaxThe syntax is as follows for declaring an array −datatype array_name [size];Types of arraysArrays are broadly classified into three types. They are as follows −One – dimensional arraysTwo – dimensional arraysMulti – dimensional arraysInitializationAn array can be initialized in two ways, which are as follows −Compile time initialization.Runtime initialization.Two multidimensional arraysThese are used in situations where a table of values have to be stored (or) in matrices applications.SyntaxThe syntax is given below −datatype array_ name [rowsize] [column size];For example int a[5] [5];a[0][0]10a[0][1]20a[0][2]30a[1][0]40a[1][1]50a[1][2]60a[2][0]a[2][1]a[2][2]Following is the C Program for ... Read More

12K+ Views
An array is a group of related items that store with a common name.SyntaxThe syntax is as follows for declaring an array −datatype array_name [size];Types of arraysArrays are broadly classified into three types. They are as follows −One – dimensional arraysTwo – dimensional arraysMulti – dimensional arraysOne – dimensional arrayThe Syntax is as follows −datatype array name [size]For example, int a[5]InitializationAn array can be initialized in two ways, which are as follows −Compile time initializationRuntime initializationExampleFollowing is the C program on compile time initialization − Live Demo#include int main ( ){ int a[5] = {10, 20, 30, 40, 50}; ... Read More

6K+ Views
First, let us learn how to find Highest Common Factor (HCF).Highest Common Factor (HCF)The greatest number divides each of the two or more numbers is called HCF or Highest Common Factor. It is also called as Greatest Common Measure(GCM) and Greatest Common Divisor(GCD).For example, What is the HCF of 12 and 16?Factors of 12 = 1, 2, 3, 4, 6, 12. Factors of 16=1, 2, 4, 8, 16Highest common factor (H.C.F) of 12 and 16 = 4.Least Common Multiple (LCM)For two integers x and y, denoted LCM(x, y), it is the smallest positive integer that is divisible by both x ... Read More

1K+ Views
ProblemWrite a C program to check the entered password by the user is valid or not based on his/her ID using nested switch case.SolutionThe solution is explained below −In C language, we can write inner switch which is placed in an outer switch.The case values of the inner and outer switch can have common values.RulesAn expression executes to a result.Constants and unique values must be used for case labels.Case labels has to be end with a colon ( : ).A break keyword has to be included in each case.There can be only one default label.We can write nested multiple switch ... Read More

764 Views
A Linked List is a linear data structure in which each node is having two blocks such that one block contains the value or data of the node and the other block contains the address of the next field.Let us assume that we have a linked list such that each node contains a random pointer which is pointing to other nodes in the list. The task is to construct the list with the same as the original list. Copying the list from the original list which is having some random pointer is called a 'Deep Copy' of the linked list.For ... Read More

2K+ Views
In a given matrix, there are four objects to analyze the element position: left, right, bottom, and top.Breadth First Search is nothing but finding the shortest distance between the two elements of a given 2-D Matrix. Thus, in each cell, there are four operations we can perform which can be expressed in four numerals such as, '2' describes that the cell in the matrix is Source.'3' describes that the cell in the matrix is Destination.'1' describes that the cell can be moved further in a direction.'0' describes that the cell in the matrix can not be moved in any direction.On ... Read More

5K+ Views
In a binary tree, each node contains two children, i.e left child and right child. Let us suppose we have a binary tree and we need to check if the tree is balanced or not. A Binary tree is said to be balanced if the difference of height of left subtree and right subtree is less than or equal to '1'.ExampleInput-1: Output:TrueExplanation:The given binary tree is [1, 2, 3, NULL, NULL, 6, 7]. The height difference of its left subtree and right subtree is equal to '1', thus it is a height Balanced tree.Input-2: Output:FalseExplanation:The given ... Read More

714 Views
Let us suppose we have a binary tree and the task is to check whether it constructs a symmetry of itself or not. A Symmetric Binary tree constructs the mirror image of itself.For ExampleInput-1: Output:TrueExplanation:Since the given binary tree constructs the mirror image of itself, the output is True.Input-2: Output:FalseExplanation:Since the given binary tree doesn't make a mirror image of itself, it is not symmetric.Approach to Solve this ProblemA symmetric binary tree is a tree which is the mirror image of itself, which means we have to check whether the left and right nodes of the tree are ... Read More

299 Views
A string is said to be a palindromic string if it remains the same after reversing it.In this particular problem, we've given two strings 'a' and 'b' of the same length. If they are split with some indexes, then the task is to check whether the sum of the strings makes a palindrome or not.Let's say we have two string 'a' and 'b' of length '4' and after splitting both the string at the index '3' such that, aaa | b and bbb | aaaa (prefix of first string) + a(suffix of ... Read More

247 Views
A Linked List is a linear data structure in which each node has two blocks such that one block contains the value or data of the node and the other block contains the address of the next field.Let us assume that we have a linked list such that each node contains the data and a pointer which is pointing to the next node of the linked list. The task is to segregate the given Linked List. Segregating the linked list means we have to separate the odd indexed nodes and even index nodes in the list.Approach to Solve this ProblemTo ... Read More