Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------program1.c
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- void check(char *a){
- printf("%c\n", a);
- }
- int main(void){
- check("hello world");
- return 0;
- }
- -------------------------
- > ( or "H", but not "h" )
- >
- ( not as i expected )
- -------------------------program2.c
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int main(void){
- char arr[] = "hello_world";
- char *p = arr;
- printf("%c\n", *p);
- return 0;
- }
- -------------------------
- > h
- >
- ( as i expected )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement