Skip to main content

Posts

Showing posts from May, 2020
To Get All Information of Sarkari Jobs | Results | Admit Card | And courses ,Internships then CLICK HERE

Row Major Order And Column Major Order in Array-:

The Formula to calculate the address of an element in 2-d array using Row Major Order would be-: Arr( A[i][j])=BA+[i*n+j]*w where, BA-: Base Address w-: width [ data type of array] i-: subscript of array element j-: subscript of array element n-: number of column m-: number of rows Q- Find address of element in array having location a[2][3] with base address 100 and it is an integer type array,and the size of array is a[3][4]? =>   we know that,                 Arr( A[i][j])=BA+[i*n+j]*w       here,                a[2][3]=100+[2*4+3]*2                a[2][3]=100+[8+3]*2                a[2][3]=100+22                a[2][3]=122.  The Formula to calculate the address of an element in 2-d array using  Column Major Order ...

Searching In Array-:

Searching means to find whether a particular value is present in the array or not. If the value is present in array then the search is said to be successful and the search process gives the location of that value in array,otherwise,if the value is not present in the array the search process displays the appropriate message and in this case search is said to be unsuccessful. There are two popular methods for searching the array elements-:               1- Linear Search CLICK HERE               2- Binary Search CLICK HERE Watch The Videos Below ads <!DOCTYPE html> <html> <head>     <title>User Login</title> </head> <body>     <h1>User Login</h1>     <form method="post" action="login_process.php">         <label for="email">Email:</label>         <...

Sorting Array Element-:

Sorting means arranging element in some specific order. If the array element are integer or float type values then they are sorted to either in ascending order or descending order. But if the array element are of char type then they are sorted in alphabetical order or reverse order. The possible types of sorting to solve an array of integer type are as follow-:               1- Selection Sorting CLICK HERE               2- Bubble Sorting  CLICK HERE               3- Insertion Sorting  CLICK HERE                                     ads           Watch The Video Below                         <?php // Start the session (if not already started) session_start(); //...

Program Of Insertion Sort-:

#include<stdio.h> void InsertionSort( int a[],  int n) {      int j, p;      int tmp;      for (p = 1; p < n; p++)      {          tmp = a[p];          for (j = p; j > 0 && a[j-1] > tmp; j--)              a[j] = a[j-1];          a[j] = tmp;      } } int main() {      int i, n, a[10];      printf ( "Enter the number of elements :: " );      scanf ( "%d" ,&n);      printf ( "Enter the elements :: " );      for (i = 0; i < n; i++)      {          scanf ( "%d" ,&a[i]...

Download The Book "Let Us C" By Yashavant P.Kanetkar,Click The Below Button

-->Email Subscription

Enter Your Email Address:-

Delivered by FeedBurner

Copyright © 2020 TechProgramiz|All Right Reserved|Made By-: Sudarshan Pandey