fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int arr[7]={1,2,3,4,5,6,7};
  5. int x=4;
  6. for(int i=0;i<7;i++){
  7. if(arr[i]==x) printf("%d",i);
  8. }
  9.  
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
3