int a = 23;
int *p1 = &a;
int b[] = {0};
int *p2 = b;
char c = 'A';
char *p3 = &c;
double d = 10.0;
double *p4 = &d;
Then check the size of them (using the sizeof() function)
and print the output in your script.
cat to display your answer.)
int arr[5] = {1,2,3,4,5};
char brr[5] = {1,2,3,4,5};
int *p1 = arr;
char *p2 = brr;
printf("%p\n", p1);
printf("%p\n", p1+1);
printf("%p\n", p2);
printf("%p\n", p2+1);
Questions:
cat to display your answer.)
Have your program prompt the user to enter the length of the array, then type in elements (have at least two attempts: one with the odd length and one with even length). Also use cat to display your program and include that in your log file.
Any answers to questions
can appear as in the output, i.e.
printf("I observe ....");
or you can type your answers into files and use cat to show them.
Have a different program for each part, even
though there might be code copied from one to another. Don't forget
to add the appropriate documentation at the top of the programs.