maze finally
This commit is contained in:
@@ -9,13 +9,11 @@ int main(void)
|
||||
|
||||
for(size_t j = 0; j < arr; j++) {
|
||||
printf("For Element %d enter num!\n", j);
|
||||
int num = 0;
|
||||
scanf("%d", &num);
|
||||
nums[j] = num;
|
||||
scanf("%d", nums + j);
|
||||
}
|
||||
|
||||
for(size_t j = 0; j < arr; j++) {
|
||||
printf("Element %d = %d\n", j, nums[j]);
|
||||
printf("Element %d = %d\n", j, *(nums + j));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
10
w3resource/pointers/test.c
Normal file
10
w3resource/pointers/test.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int x = 5;
|
||||
int *pointX = &x;
|
||||
printf("*pointX = %d and (*pointX+1) = %d and *(pointX+1) = %d\n", *pointX, (*pointX+1), *(pointX+1));
|
||||
printf("*(&pointX) = %d &(*pointX) = %d *&pointX = %d &*pointX = %d\n", *(&pointX), &(*pointX), *&pointX, &*pointX);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user