Hello,
Can someone tell me why do I get 16 instead of the full size of row * col * int?
(If I did int *iptr[4][7]; however, I would get (4*7*4) = 112 and not 16)
int *iptr[4]; // array of...
Type: Posts; User: Cpgm
Hello,
Can someone tell me why do I get 16 instead of the full size of row * col * int?
(If I did int *iptr[4][7]; however, I would get (4*7*4) = 112 and not 16)
int *iptr[4]; // array of...
Andrew, good points and thanks for the reminder on releasing memory after use. Though the malloc method requires 2 steps it allows for better management of memory/resource and code running better. At...
Salem thanks a lot for your help!!!
So in summary, I not only need to allocate memory for the array of structures but also the members within the structure. And since these members were not...
OK, I created pointer of an array of structure of size 10; initialize it but when i print it is is only printing the last element for two of the members (sigName and rfConn). Can someone tell me what...
Ok, I did some more research and was able to figure out what I need to do for what my I was trying to do:
1) needed a pointer pointing to an array of several string elements (e.g. 10)
2)...
Try with these fixes,
Note that each off these assignment should each be on separate line
c = 3, h = 7, n = 1, o = 2, weight = 89.0929;
#include <stdio.h>
int main( ) {
int c=3, h=7,...
Sorry about it not being clear. max = 10 (declared at top of program: malloc)
I have reduced the program and make it easier to read/follow. I have also added comment to where the error occurs: see...
Hello, I am getting an error when I run the following code: the error occurs in function printArryIIS when attempting to pring content of arrays, string pointer array to be specific:
Error msg:...
Salem, thx for your response.
So are you saying I cannot use a char pointer as a member inside a structure (i.e. it would have to be a string...like char name[10] instead of char* name)?
Hello, I am not sure why I am not able to print member structure member aa. Can someone please help? Code and output below:
#include <ansi_c.h>
// Structuer passing example
typedef struct...