Literal's like that are stored in the machine language representation of the program itself. So, in a sense they do have an "address", but it's not one you generally have access to.
It's interesting that you used the proper technical term to describe them in assembly language: immediate.
Code:
#include <stdio.h>
int main() {
int a = 24;
a += 18;
printf("%d\n", a);
return 0;
}
Code:
.file "immediate.c"
.section .rodata
.LC0:
.string "%d\n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $16, %rsp
movl $24, -4(%rbp) # there's the immediate 24
addl $18, -4(%rbp) # there's the immediate 18
movl -4(%rbp), %eax
movl %eax, %esi
movl $.LC0, %edi
movl $0, %eax
call printf
movl $0, %eax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc