There is not a short and easy way to do that. If you need to search your variables for matching values, then they're related enough to put in an array:
int a[] = {4, 2, 4, 4};
And if you need to keep the names, it's only slightly more complex:
struct Variable
{
char *name;
int value;
};
struct Variable a[] =
{
{"a", 4},
{"b", 2},
{"c", 4},
{"d", 4},
};
An array makes the whole process of looking for matches much easier because you can throw everything in a loop:
for (int x = 0; x < sz; ++x)
{
if (a[x] == key) ++matches;
}