Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //well, I do not know if this is correct, I was trying to check if a pointer had not been started
- //when I remembered to do that! and it worked
- #include <stdio.h>
- int main(void) {
- int* allval;
- if(allval == (int*)0) {
- printf("sim\n");
- }
- else {
- printf("nao\n");
- }
- allval = (int*)malloc(5 * sizeof(int));
- if(allval == (int*)0) {
- printf("sim\n");
- }
- else {
- printf("nao\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement