Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5. int A = 5, B = 7, count_one, count_two;
  6.  
  7. // %nフォーマット文字列の例(文字'X'までに出力したバイト数が、
  8. // それぞれcount_oneとcount_twoに格納される)
  9. printf("The number of bytes written up to this point X%n is being stored is count_one, and the number of bytes up to here X %n is being stored in count_two.\n", &count_one, &count_two);
  10.  
  11. printf("count_one: %d\n", count_one);
  12. printf("count_two: %d\n", count_two);
  13.  
  14. // スタックの例
  15. printf("A is %d and is at %08x. B is %x.\n", A, &A, B);
  16.  
  17. exit(0);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement