You are still passing a pointer to a pointer to function parser...
int main(void)
{
char kbuff[15];
parser( &kbuff );
}
Type: Posts; User: csisz3r
You are still passing a pointer to a pointer to function parser...
int main(void)
{
char kbuff[15];
parser( &kbuff );
}
if (data = within_x_percent(100,data,x))
printf("%f is within 5 percent of the boiling point of water.\n", data);
I want to write an add_node function that will not depend on a global variable head.
#include <stdio.h>
void change_x(int **x)
{
*x = (int *)10;
}
int main(void)
{
int *x = NULL;
What does it mean to canonicalize the coordinates of a rectangle? I know it doesn' t have much to do with C programming but I read about it in the "The C Programming Language" book so I hope this is...
#include <stdio.h>
typedef struct{
int number;
int place;
int postcode;
} information_t;
int test(information_t *in);
#include <stdio.h>
int main(int argc, char *argv[])
{
while (argc-- > 0)
printf("%s ", argv[argc]);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int compare(const void *name1, const void *name2)
{
char *const *x = (char *const *)name1;
char *const *y = (char *const...
swoopy, it won't work if I change the code to what you suggested :(
While looking for information on how to use the qsort function here on the board, I came across this:
int compare(void const *name1, void const *name2)
{
char *const *x = (char *const...
On function players, what is the value of variable numo when you first use it?
You can start from there...
It's ok, I don't like him much anyway :p
That was exactly the problem... I was trying to increment an array. The authors mention that on the book. I gotta love them and pay more attention....
I know that works but I wanted to manipulate the pointer directly. What botters me the most is that I took that from the book The C Programming Language 2nd Edition and it is not working :mad:
#include <stdio.h>
int main(void)
{
char *names[] = {"Meg", "John", "Susan", "Charlotte", "Mario"};
unsigned int nelements = sizeof names / sizeof(*names);
while (--nelements >...
Consider this:
#include <stdio.h>
int main(void)
{
int c;
char *argv[] = {"hello", "world"};
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char *p = NULL;
char linha[100];
char **strings = NULL;
int c = 0;
Is this correct?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char *p = NULL;
if ( numStrings == maxStrings ) {
/* after this, I'll be able to store 10 strings in variable strings, right? */
void *temp = realloc ( strings, (maxStrings+10) * sizeof *strings );
if (...
No! :(
Hi. I'm learning about pointers and as an exercise I'm trying to create a program that will store an unknown number of pointers to strings that will be input by the user in an array of pointers.
...
"The following loop fills an array with integers by calls to getint:
int n, array[SIZE], getint(int *);
for (n = 0; n < SIZE && getint(&array[n]) != EOF; n++)
;
Each call sets...
Let's say the user enters the characters "123". When the function finishes, pn[0] will be equal to 1, pn[1] will be equal to two, and pn[3] will be equal to 3, right? In this case, all characters are...
I'm reading this wonderful book called The C Programming Language 2nd Edition and I'm having a hard time understanding how to use this function that is on page 97. Here it is:
int getint(int...
Do you mean strcmp()?
After that, you should find the area of both rectangles (the yard and the house) using the formula area = length * width . Then you need to subtract the area of the house from the area of the yard to...