70,037
社区成员
发帖
与我相关
我的任务
分享#include <stdio.h>
#include <stdlib.h>
int main(){
int c1 = 'c' ;
int c2 = 'abc' ;
printf( "int_c1 = %d\n" , c1 ) ;
printf( "char_c1 = %c\n" , c1 ) ;
printf( "int_c2 = %d\n" , c2 ) ;
printf( "char_c2 = %c\n" , c2 ) ;
system("pause") ;
}; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.762
TITLE tmp.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
_DATA SEGMENT
$SG2242 DB '0x%x', 0aH, 00H
ORG $+2
$SG2243 DB '0x%x', 0aH, 00H
ORG $+2
$SG2244 DB '0x%x', 0aH, 00H
ORG $+2
$SG2245 DB '0x%x', 0aH, 0aH, 00H
ORG $+1
$SG2246 DB '0x%x', 0aH, 00H
ORG $+2
$SG2247 DB '0x%x', 0aH, 00H
ORG $+2
$SG2248 DB '0x%x', 0aH, 00H
ORG $+2
$SG2250 DB '0x%x', 0aH, 00H
ORG $+2
$SG2252 DB '0x%x', 0aH, 00H
ORG $+2
$SG2254 DB '0x%x', 0aH, 00H
_DATA ENDS
PUBLIC _main
EXTRN _printf:PROC
; Function compile flags: /Odtp
_TEXT SEGMENT
_main PROC
; File tmp.c
; Line 5
push ebp
mov ebp, esp
; Line 6
push 94 ; 0000005eH
push OFFSET $SG2242
call _printf
add esp, 8
; Line 7
push 38 ; 00000026H
push OFFSET $SG2243
call _printf
add esp, 8
; Line 8
push 124 ; 0000007cH
push OFFSET $SG2244
call _printf
add esp, 8
; Line 9
push 65 ; 00000041H
push OFFSET $SG2245
call _printf
add esp, 8
; Line 11
push 24129 ; 00005e41H
push OFFSET $SG2246
call _printf
add esp, 8
; Line 12
push 6170177 ; 005e2641H
push OFFSET $SG2247
call _printf
add esp, 8
; Line 13
push 1579580481 ; 5e267c41H
push OFFSET $SG2248
call _printf
add esp, 8
; Line 14
push 65 ; 00000041H
push OFFSET $SG2250
call _printf
add esp, 8
; Line 15
push 65 ; 00000041H
push OFFSET $SG2252
call _printf
add esp, 8
; Line 16
push 65 ; 00000041H
push OFFSET $SG2254
call _printf
add esp, 8
; Line 17
xor eax, eax
; Line 18
pop ebp
ret 0
_main ENDP
_TEXT ENDS
END
#include <stdio.h>
int main(void)
{
printf("0x%x\n", '^');
printf("0x%x\n", '&');
printf("0x%x\n", '|');
printf("0x%x\n\n", 'A');
printf("0x%x\n", '^A');
printf("0x%x\n", '^&A');
printf("0x%x\n", '^&|A');
printf("0x%x\n", (char)'^A');
printf("0x%x\n", (char)'^&A');
printf("0x%x\n", (char)'^&|A');
return 0;
} #include <stdio.h>
#include <stdlib.h>
int main(){
int n ;
printf( "^ = %d\n" , '^' ) ;
printf( "A = %d\n" , 'A' ) ;
printf( "^A = %d\n\n" , '^A' ) ;
printf( "#A = %d\n" , '#A' ) ;
fflush(stdin);
printf( "please enter:" ) ;
scanf( "%d" , &n ) ;
if( n != '^A')
printf( "Error\n" ) ;
else
printf( "Right\n") ;
system("pause") ;
}