title: What is the meaning of CUDA return value error 35?
body: <p><strong>My source code of simple C++ cuda code</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cuda.h&gt;
  
  using namespace std;
  
  __global__ void AddIntsCUDA(int *a, int *b, int *c)
  {
      *c = *a + *b;
  }
  
  int main()
  {
      int a, b, c;
      int *d_a, *d_b, *d_c;
      int size = sizeof(int);
  
      cudaMalloc((void **)&amp;d_a, size);
      cudaMalloc((void **)&amp;d_b, size);
      cudaMalloc((void **)&amp;d_c, size);
  
  
      a = 10;
      b = 35;
      c = 0;
  
      cudaMemcpy(d_a, &amp;a, size, cudaMemcpyHostToDevice);
      cudaMemcpy(d_b, &amp;b, size, cudaMemcpyHostToDevice);
  
      AddIntsCUDA&lt;&lt;&lt;1, 1&gt;&gt;&gt;(d_a, d_b, d_c);
  
      cudaMemcpy(&amp;c, d_c, size, cudaMemcpyDeviceToHost);
  
      cout &lt;&lt; "The Answer is "&lt;&lt; c &lt;&lt; endl;
  
      cudaFree(d_a);
      cudaFree(d_b);
      cudaFree(d_c);
  
      system("pause");
  
      return 0;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fR1x9.png" rel="nofollow noreferrer">Console Output</a>
  output shows c = 0 but i expect sum of a and b output (should like this 45 because a = 10, b = 35)
  explain me what the hell is happening in this code</p>