Run This Code Below
Run This Code Below
Run This Code Below
Lab 8
Due: Friday Oct 31
Warm up exerciseswe will discuss the following
Pointer s
Passing pointers to functions
Returning pointers from functions
Arithmetic
Introduction to strings
#include <stdio.h>
int main()
{
int a[3] = {10, 12, 10};
printf(" a is %d\n", a);
printf(" a+1 is %d\n",a+1);
printf(" a+2 is %d\n",a+2);
printf(" *a is %d\n",*a);
printf(" *(a+1) is %d\n", *(a+1));
printf(" *(a+2) is %d\n", *(a+2));
printf(" address of a[0] is %d\n", &a[0]);
printf(" address of a[1] is %d\n", &a[1]);
printf(" address of a[2] is %d\n", &a[2]);
return 0;
}