Please help folks, I really
appreciate!
(a)
agep=age;
No need to change anything because age it self a pointer to the first variable of the array.
here are we are copying that address to the agep. When we try to print it prints the first value.
printf("%d",*agep);//30
(b)
s= *agep;
agep is pointer to the first element of the array. So access that value place asterisk before agep.
Now s have the value 30.
(C)
agep= &age[1];
we konw that agep is a pointer . 65 is at index 1.
So &age[1] will be the address of the value 65.
(d)
maxp=agep;
Both agep and maxp are pointers. So no need to change anything in the statement .
The address in the agep is now also in maxp. Which means maxp also referent to same value as agep.
(e)
agep is pointer and it only stores the address of a variable. It cannot store the value of expression directly. So first we store value in the variable and then pass address of that variable to the pointer.
t=(age[1]+age[3])/2;
agep=&t;
(f)
scanf("%hi",&age[2]);
stores value at address of third element in the array.
(g)
You cannot take user input into the pointer . It gives segmentation fault. First we have pass the address of the variable to it and take input.
aegp=&t;
scanf("%hi",agep);
(h)
printf("%hi",*agep);
use asterisk to print the value in the pointer
Please help folks, I really appreciate! Complete each of the following C statements by adding an...
I need a basic program in C to modify my program with
the following instructions:
Create a program in C that will:
Add an option 4 to your menu for "Play Bingo"
-read in a bingo call (e,g, B6, I17, G57, G65)
-checks to see if the bingo call read in is valid (i.e., G65 is
not valid)
-marks all the boards that have the bingo call
-checks to see if there is a winner, for our purposes winning
means...