Guest User

Untitled

a guest
Jan 4th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /*
  2. ============================================================================
  3. Name : testsizeof.c
  4. Author :
  5. Version :
  6. Copyright : Your copyright notice
  7. Description : Hello World in C, Ansi-style
  8. ============================================================================
  9. */
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. int main(void)
  14. {
  15. int entier=5;
  16. char chaine[] = "bonjour, ceci est une chaine";
  17.  
  18. printf("taille de entier : %d\n", sizeof(entier));
  19. printf("taille de chaine : %d\n", sizeof(chaine));
  20. printf("Code ASCII : premier caractere de la chaine : %d\n", chaine[0]);
  21. printf("Code ASCII : dernier caractere : %d\n", chaine[sizeof(chaine)-2]);
  22. return EXIT_SUCCESS;
  23. }
Add Comment
Please, Sign In to add comment