Question: I am trying to achieve that C interprets my string as macro.

Hey, let's suppose there is a defined macro as,

```
#define ABC 900

```

If i define; 

```
char* s[] = "ABC" ; 

```

then,

```
printf("%d",s) ; 

```

Is there any way the compiler understands that "ABC" as macro ABC and passes 900 integer value to printf ? 

```
#include<stdio.h>
#define abc 15

int main(void) {

    char a[] = "abc" ;

    printf("%d",a); 

    return 0;
}

```

When i try the above code, instead of my desired output 15 , i get 6487568 which i guess the integer equivalent of that string.

Edit : those were random values , or address of strings. ( as stated below by others )

Answer: 
No, what you're trying to do is double impossible. You can't access variables by name at runtime (string -> variable) because the compiled machine code knows nothing about the names in your C code, and you can't access macros from the compiler because the compiler knows nothing about macros (they're expanded by the preprocessor before the compiler even sees the code).

In other words, compilation / execution happens in multiple stages:

1. C source code is preprocessed (which gets rid of directives like `#include` or `#define` and expands macros).
2. The preprocessed token stream is passed to the compiler, which converts it to machine code (a runnable program).
3. Finally the program runs.

Simplified example:

```
// original C code
#define FOO 42
...
int x = y + FOO;

```

After preprocessing:

```
...
int x = y + 42;

```

After compilation:

```
movl %ecx, %eax
addl $42, %eax

```

There is no trace of `FOO` in step 2, and the final code knows nothing about `x` or `y`.

Variable values such as strings only exist at runtime, in step 3. You can't get back to step 1 from there. If you wanted to access information about macros at runtime, you'd have to keep it explicitly in some sort of data structure, but none of this is automatic.
Macros are simple copy paste and they are pretty limited. A macro will not expand if it's quoted or commented.

One solution would be:

```
#define ABC "900"
char s[] = ABC; 

```

But no, macros cannot be used for what you're trying to do. 

> 
> When i try the above code, instead of my desired output 15 , i get 6487568 which i guess the integer equivalent of that string.
> 
> 
> 

It's undefined behavior. Most likely it's the address of the string. If you compile with `-Wall` you will get a warning for this.