Given the memory setup shown, fill in the chart by indicating the data type and value of each reference as well as the name of the function in which the reference would be legal. Give pointer values...
Type: Posts; User: Daveo
Given the memory setup shown, fill in the chart by indicating the data type and value of each reference as well as the name of the function in which the reference would be legal. Give pointer values...
Thanks for the input guys/gals.........really gonna help me in the final exam! I hope you guys dont mind if I ask more questions later on when I stumble over something I dont understand. :)
Also, could you please clarify what this means:
file type *variable name;
What does the * mean?
Some tell me that when you see that, it jsut meanst that the variable is a pointer.
...
Also Brian, the way use have used prototypes is different from what I use.
Your way is like this:
int sum(int, int);
My way - they way I have been taught:
Do you mean:
If its not, im confused. :(
Also from the above code, how does *signp, *wholep, & *fracp know when to store results when it doesnt have the address. I cannot see anywhere in the code where &num is used to store the address.
void
sperate(double num, char *signp, int *wholep, double *fracp)
{
double magnitude;
if(num < 0)
*signp = ' - ';
else if(num == 0)
...
:) .
Thanks Sean!
Now, is there any difference between:
pointer type* pointer variable name;
and
pointer type *pointer variavle name;
Also, im having a hard time understanding the basics of pointers. Could you guys direct me to the right place, possibly a tutorial on pointers that is not hard, and easy to understand for someone...
Ive have been reading several books regarding this topic, and all books state that the return statement can only return one value of result.
How does this happen when you can return something like...
More questions....sorry!
Now, say I have the following structure:
typedef struct
{
int date, month, year;
}date_t;
Thanks for the help and clarification guys.
Now, how come every function that passes a pointer as an argument, there is a code for status. Whats this for? Also, the the number in status = to the...
When I have an input function, then I will have to use pointers (outputs) as arguments,
AND
When I have an output function, then I dont have to use pointers as arguements.
Is this correct?
...
What is the point of the prototype?
I dont see how it aids the program.
Like, why do you need to add something just before the main program:
int scan_function(int number)
Say I need a function that needs to get information from the user...
Do I do the following?
get_date(date_t *date)
{
scanf("%d%d%d", &(*date).day, &(*date).month,...
When should I use pointers when it comes to creating an input/output function?
This program I have written up has to print all the prime numbers between 1-10,000 However, for some reason, its only prints out prime numbers up to 29.
#include <stdio.h>
#include <math.h>...
#include <stdio.h>
#include <math.h>
#include <conio.h>
int number, result;
double square_number;
int
square(int number)
{