#Include Stdio.h
#Include Stdio.h
h>
int main() {
int arr[10] = {1, 2, 3, 4, 5}; // Array with 5 elements
int n = 5;
int value = 10, pos = 3;
return 0;
}
#include <stdio.h>
int main() {
int arr[10] = {1, 2, 3, 4, 5}; // Array with 5 elements
int n = 5;
int pos = 3;
return 0;
}
#include <stdio.h>
int search(int arr[], int n, int value) {
for (int i = 0; i < n; i++) {
if (arr[i] == value) {
return i; // Return index of element
}
}
return -1; // Return -1 if not found
}
int main() {
int arr[10] = {1, 2, 3, 4, 5};
int n = 5;
int value = 3;
if (index != -1) {
printf("Element %d found at index %d\n", value, index);
} else {
printf("Element %d not found\n", value);
}
return 0;
}
#include <stdio.h>
void insert(int arr[][3], int *n, int value, int row, int col) {
arr[row][col] = value;
(*n)++;
}
int main() {
int arr[5][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int n = 3; // Number of rows
int value = 10, row = 1, col = 2;
return 0;
}
#include <stdio.h>
int main() {
int arr[5][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int n = 3;
int row = 1, col = 2;
return 0;
}
#include <stdio.h>
int main() {
int arr[5][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int n = 3;
int value = 5;
if (index != -1) {
printf("Element %d found at position %d\n", value, index);
} else {
printf("Element %d not found\n", value);
}
return 0;
}