fork download
  1. // Online C compiler to run C program online
  2. #include <stdio.h>
  3.  
  4. int main() {
  5. // Write C code here
  6. int v1[3] = {1,2,3};
  7. int v2[3] = {4,5,6};
  8. int v3[3];
  9. int *p,*q,*r;
  10.  
  11. int value=4;
  12. int c=0;
  13. for(q=&v2[0];q<&v2[3];q++)
  14. {
  15. if(*q>value)
  16. {
  17. c++;
  18. }
  19. }
  20. printf("%d\n",c);
  21.  
  22. for(p=&v1[0],q=&v2[0],r=&v3[0];p<&v1[3];p++,q++,r++)
  23. {
  24. *r=*p * *q;
  25. }
  26.  
  27. int i;
  28. for(i=0;i<3;i++)
  29. {
  30. printf("%d ",v3[i]);
  31. }
  32. return 0;
  33. }
Success #stdin #stdout 0s 5540KB
stdin
Standard input is empty
stdout
2
4 10 18