Module_4_Solutions
Module_4_Solutions
Definition:
int arr[3][2] = {
{1, 2},
{3, 4},
{5, 6}
};
Accessing Elements:
Passing to Functions:
printf("\n");
}
2. Multidimensional arrays with examples and applications.
Definition:
Multidimensional arrays are arrays with more than one index. A 2D array is a common example.
Application:
- Representing matrices
Definition:
a) Bubble Sort:
// Swap
}
}
b) Selection Sort:
int min = i;
c) Insertion Sort:
int j = i - 1;
arr[j+1] = arr[j];
j--;
arr[j+1] = key;
Definition:
Input/Output:
printf("%s", str1);
puts(str1);
Reading:
char name[50];
Writing:
Example:
#include <stdio.h>
int main() {
char str[100];
puts(str);
return 0;