C, 44 bytes, 41 bytes
int*n(int*s,int a){return a?n(&s,a-1):s;}
You can test it by doing the following:
int main(void) {
char* s = "stackoverflow";
/* Test Case 0 */
int* a = n(s,0);
printf("'%s'\n", a);
/* Test Case 1 */
int* b = n(s,1);
printf("['%s']\n", *b);
/* Test Case 2 */
int** c = n(s,2);
printf("[['%s']]\n", **c);
/* Test Case 3 */
int*** d = n(s,3);
printf("[[['%s']]]\n", ***d);
/* Test Case 4 */
int********** e = n(s,10);
printf("[[[[[[[[[['%s']]]]]]]]]]\n", **********e);
return 0;
}
The output:
'stackoverflow'
['stackoverflow']
[['stackoverflow']]
[[['stackoverflow']]]
[[[[[[[[[['stackoverflow']]]]]]]]]]
Of course, you'll get warnings. This works on gcc on bash on my Windows machine (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3), as well as on a true Linux machine (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)).