The exact answer is platform specific, but generally speaking, three things cause data in external memory to be loaded into the processor cache.
The most obvious is an actual instruction that accesses the memory in the ordinary way. If that memory address is not resident in processor cache, the processor will have to acquire it. The second way is speculative prefetching. Some processors will acquire memory into cache if they believe the code might access it. Lastly, compilers can actually emit instructions to put things into cache.
All your operations are on pointers, so that's all they'll load, except this one: double t=*(a+i*3);
. That actually dereferences a pointer and accesses its value. So unless the compiler is smart enough to optimize the access away (because you never use the result) that is likely the only part of your code that will result in something other than a pointer being read from main memory into cache. (Assuming it ever gets to main memory, which depends on your cache size.)