void arr_func(char ch[10]) {
  printf("Address of array parameter: %#x\n", &ch);
  printf("       Address of &(ch[0]): %#x\n", &(ch[0]));
  printf("       Address of &(ch[1]): %#x\n", &(ch[1]));
  printf("       Address of     ++ch: %#x\n", ++ch);
}


x86 assembly (clang, -O0):
<arr_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    %rsi,-0x8(%rbp)
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arr_func>:
push   %rax
mov    %rdi,(%rsp)
lea    0xee4(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%rsi
lea    0xef0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%rsi
add    $0x1,%rsi
lea    0xefb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%rsi
add    $0x1,%rsi
mov    %rsi,(%rsp)
lea    0xf02(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Address of array parameter: %#x\0A\00"
@.str.1 = [33 x i8] c" Address of &(ch[0]): %#x\0A\00"
@.str.2 = [33 x i8] c" Address of &(ch[1]): %#x\0A\00"
@.str.3 = [33 x i8] c" Address of ++ch: %#x\0A\00"
define void @arr_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %2)
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Address of array parameter: %#x\0A\00"
@.str.1 = [33 x i8] c" Address of &(ch[0]): %#x\0A\00"
@.str.2 = [33 x i8] c" Address of &(ch[1]): %#x\0A\00"
@.str.3 = [33 x i8] c" Address of ++ch: %#x\0A\00"
define void @arr_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %2)
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %2
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %10)
ret void
}