
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

3K+ Views
An array is a group of related data items which share’s a common name. A particular value in an array is identified with the help of its "index number".Declaring arrayThe syntax for declaring an array is as follows −datatype array_name [size];For example, float marks [50]It declares ‘marks’ to be an array containing 50 float elements.int number[10]It declares the ‘number’ as an array to contain a maximum of 10 integer constants.Each element is identified by using an "array index".Accessing array elements is easy by using the array index.The logic we use for merge sort is as follows −void MergeSort(int *array, int ... Read More

4K+ Views
ProblemWrite a C program to delete an element from an array at runtime by the user and the result to be displayed on the screen after deletion. If the deleted element is not in an array, then we need to display Invalid Input.SolutionAn array is used to hold the group of common elements under one name.The array operations are as follows −InsertDeleteSearchAlgorithmRefer an algorithm to delete the elements into an array with the help of pointers.Step 1 − Declare and read the number of elements.Step 2 − Declare and read the array size at runtime.Step 3 − Input the array ... Read More

6K+ Views
ProblemWrite a C program to insert the elements into an array at runtime by the user and the result to be displayed on the screen after insertion. If the inserted element is greater than the size of an array, then, we need to display Invalid Input.SolutionAn array is used to hold the group of common elements under one name.The array operations are as follows −InsertDeleteSearchAlgorithmRefer an algorithm to insert the elements into an array with the help of pointers.Step 1: Declare and read the number of elements.Step 2: Declare and read the array size at runtime.Step 3: Input the array ... Read More

120K+ Views
Problem Sort the given array in descending or ascending order based on the code that has been written. Solution An array is a group of related data items which share’s a common name. A particular value in an array is identified with the help of its "index number". Declaring array The syntax for declaring an array is as follows − datatype array_name [size]; For example, float marks [50] It declares ‘marks’ to be an array containing 50 float elements. int number[10] It declares the ‘number’ as an array to contain a maximum of 10 integer constants. Each element is identified ... Read More

17K+ Views
ProblemSort the given array in descending or ascending order based on the code that has been written.SolutionAn array is a group of related data items which share’s a common name. A particular value in an array is identified with the help of its "index number".Declaring arrayThe syntax for declaring an array is as follows −datatype array_name [size];For example, float marks [50]It declares ‘marks’ to be an array containing 50 float elements.int number[10]It declares the ‘number’ as an array to contain a maximum of 10 integer constants.Each element is identified by using an "array index".Accessing array elements is easy by using ... Read More

20K+ Views
Pointers A pointer is a variable that stores the address of another variable. Instead of holding a value directly, it holds the address where the value is stored in memory. The two main operators used with pointers are the dereferencing operator and the address operator. These operators are used to declare pointer variables and access the values stored at those addresses. The pointer variable uses the dereferencing operator to access the value it points to. We use the address operator to obtain the memory address of a variable and store it in the pointer variable. We use pointers to access ... Read More

34K+ Views
ProblemFind the non-repeating element in an array by using the two loops. One is for the current element and the other is to check, if an element is already present in an array or not.SolutionConsider an example given below −15, 15, 16, 15, 13, 15Here, the non-repeated elements in an array are 16 and 13.AlgorithmRefer an algorithm given below for finding the unique or the non-repeated elements in an array.Step 1 − Declare an array and input the array elements at run time.Step 2 − Start traversing the array and check, if the current element is already present in an ... Read More

4K+ Views
ProblemFind out if a given number can be expressed as sum of two prime numbers or not.Given a positive integer N, we need to check if the number N can be represented as a sum of two prime numbers.SolutionConsider an example given below −20 can be expressed as sum of two prime numbers 3 and 17, 13 and 7.20= 3+720= 13+7AlgorithmRefer an algorithm given below for expressing a given number as a sum of two prime numbers.Step 1 − Input the number to be checked at run time.Step 2 − Repeat from i = 2 to (num/2).Step 3 − Check ... Read More

5K+ Views
We can apply the software development method to solve the linear equation of one variable in C programming language.RequirementThe equation should be in the form of ax+b=0a and b are inputs, we need to find the value of xAnalysisHere, An input is the a, b values.An output is the x value.AlgorithmRefer an algorithm given below to find solution of linear equation.Step 1. Start Step 2. Read a, b values Step 3. Call function Jump to step 5 Step 4. Print result Step 5: i. if(a == 0)Print value of c cannot be predictedElseCompute c=-b/aReturn cStep 6: StopProgramFollowing is the C ... Read More

2K+ Views
Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. They are defined as a collection of nodes. Here, nodes have two parts, which are data and link. The representation of data, link and linked lists is given below −Types of Linked ListsLinked lists have four types, which are as follows −Single / Singly linked listsDouble / Doubly linked listsCircular single linked listCircular double linked listThe logic we used to find the length of linked list by using recursion method is −int length(node *temp){ if(temp==NULL) return l; else{ l=l+1; ... Read More