Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ============================================================================
- Name : testsizeof.c
- Author :
- Version :
- Copyright : Your copyright notice
- Description : Hello World in C, Ansi-style
- ============================================================================
- */
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- int entier=5;
- char chaine[] = "bonjour, ceci est une chaine";
- printf("taille de entier : %d\n", sizeof(entier));
- printf("taille de chaine : %d\n", sizeof(chaine));
- printf("Code ASCII : premier caractere de la chaine : %d\n", chaine[0]);
- printf("Code ASCII : dernier caractere : %d\n", chaine[sizeof(chaine)-2]);
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment