Getting output as 0 instead of defined value
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char *val;
char MODE_VAR[1000]="MODE0";
int MODE0_SENSE=9;
val= strcat(MODE_VAR,"\_SENSE");
printf("String value = %s, Int value = %d\\n", MODE_VAR, atoi(val));
return 0;
}
I get output as String value = MODE0_SENSE, Int value = 0
I would like to get: String value = MODE0_SENSE, Int value = 9
What is wrong in the code and how to fix?