They are exactly identical.
To test this yourself, run gcc -S test.c (suppose this is where you put your source) and watch the contents of test.s
Here's how the nested- if approach compiles in gcc 4.8.1 with default parameters (annotated with comments):
main: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl $0, %eax call A
Here's how the && approach compiles:
main: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl $0, %eax call A
source share