Basic algebra formulas that you can revise anytime and anywhere

FORMULAS FOR BEGINNER (a+b) ^2= a^2+b^2+2ab (a+b) ^2= (a-b) ^2+4ab (a-b) ^2= a^2+b^2-2ab (a-b) ^2= (a+b) ^2-4ab a^2+b^2= (a+b) ^2-2ab a^2+b^2= (a-b) ^2+ 2ab a^2-b^2= (a+b) (a-b) (a+b+c) ^2= a^2+b^2+c^2+2(ab+bc+ac) (a-b-c) ^2= a^2+b^2+c^2-2(ab-bc+ac) (a+b) ^3= a^3+b^3+3ab(a+b) (a-b) ^3= a^3-b^3+3ab(a-b) a^3+b^3= (a+b) (a^2-ab+b^2) a^3-b^3= (a-b) (a^2+ab+b^2) a^4-b^4= (a^2-b^2) (a^2+b^2) = (a^2+b^2) (a+b) (a-b) a^5+b^5= (a+b) (a^4-a^3b+a^2b^2-ab^3+b^4) a^5-b^5= (a-b) (a^4+a^3b+a^2b^2+ab^3+b^4)

Arrays





Array is a collection of similar data type items. Arrays are used to store group of data of same datatype. Arrays can of any datatype. Arrays must have constant size. Continuous memory locations are used to store array. Array index always starts with 0.

Example for Arrays:

int a[5]; // integer array
char a[5]; // character(string) array


Types of Arrays:

# One Dimensional Array
# Two Dimensional Array
# Multi Dimensional Array


 One Dimensional Array

Array declaration
int age [5];

Array initialization
int age[5]={0, 1, 2, 3, 4, 5};

Accessing array
age[0]; /*0_is_accessed*/
age[1]; /*1_is_accessed*/
age[2]; /*2_is_accessed*/


 Two Dimensional Array

Two dimensional array is combination of rows n columns.
Array declaration
int arr[2][2];

Array initialization
int arr[2][2] = {{1,2}, {3,4}};

Accessing array
arr [0][0] = 1;
arr [0][1] = 2;
arr [1][0] = 3;
arr [1][1] = 4;


Multi Dimensional Array

C programming language allows programmer to create arrays of arrays known as multidimensional arrays.
For example:
float a[2][4][3];


Passing Array To Function

In C we can pass entire Arrays to functions as an argument.
For eg.
#include <stdio.h>
void display(int a)
{
  int i;
  for(i=0;i < 4;i++){
    printf("%d",a[i]);
  }
}
int main(){
  int c[]={1,2,3,4};
  display(c);
  //Passing array to display.
  return 0;
}

These are the Concept of C programming . We'll be glad if you share your valuable information with us regarding this topic, then it will be a golden opportunity for all of us to improve ourselves and know more. Comment below!!

Comments

Popular posts from this blog

Are you willing to relocate or travel(HR QUESTION)

How to answer " why do you want to work at our company? "(HR QUESTION)