Write a C program such that it prints out every element smal
Write a C program such that it prints out every element smaller than 40 of array A [5,16,87,65,4,32,11,108,10,25,12,27,56,38].
Solution
#include <stdio.h>
int main() {
 int i;
 int A[] = {5,16,87,65,4,32,11,108,10,25,12,27,56,38};
 for(i=0; i<15; i++){
 if(A[i] < 40){
 printf(\"%d \", A[i]);
 }
   
 }
 printf(\"\ \");
 return 0;
 }
Output:
sh-4.2$ gcc -o main *.c
sh-4.2$ main
5 16 4 32 11 10 25 12 27 38 0
![Write a C program such that it prints out every element smaller than 40 of array A [5,16,87,65,4,32,11,108,10,25,12,27,56,38].Solution#include <stdio.h> i Write a C program such that it prints out every element smaller than 40 of array A [5,16,87,65,4,32,11,108,10,25,12,27,56,38].Solution#include <stdio.h> i](/WebImages/47/write-a-c-program-such-that-it-prints-out-every-element-smal-1149152-1761618402-0.webp)
