diff --git a/src/radix_par2.cu b/src/radix_par2.cu
index eae49a3713dec42e968c6d4cea75d8dcc9499f6f..356cdad952dde190110e139dc56d3b58dd39c58a 100644
--- a/src/radix_par2.cu
+++ b/src/radix_par2.cu
@@ -18,7 +18,7 @@ int getMax(int arr[], int n)
 // the digit represented by exp. 
 __global__ void countSort(int arr[], int n, int exp) 
 { 
-    int output[n]; // output array 
+    int *output= (int*)malloc(sizeof(int)*n); // output array 
     int i, count[10] = {0}; 
   
     // Store count of occurrences in count[]