If you're going to program C, you're going to need them.
If you're going to program C, you're going to need them.
The reason why i dont want to use pointers is because i have to do the program in a programming language called baci which is similar to c but is not c. It would be like c --, i figure out if i learn in c baci will be like a pice of cake.
Wise_ron
One man's constant is another man's variable
And they don't have pointers in baci? Wow...
Ok, well look, this is a C forum. Not a baci forum. I can help you with C related stuff, and not baci (as I don't know this language and have no intention of learning it), and it's likely to be the same for all the other members.
So my best advice to you is to find some equivalent to pointers in baci...because C would be pretty lame if it didn't have pointers...
Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction
Can some one help me with this c programming code. Iam trying to pass the character array string from sever fuction to client function.
Code:#include<stdio.h> main() { server(); client(); return 0; } void server(void) { char client1[]= "Hello"; //message from the server } void client(void) { int i=1; printf("client 1 sends: %s\n", client1); for(i=2; i<10;i++) printf("client %d receives: %s\n", i, client1); }
Wise_ron
One man's constant is another man's variable
The scope of client1 is within the server function, therefore no other parts of your code can see it.
Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction
This:Could be more efficiently done as:Code:int i = 1; ... for (i = 2; i < 10; i++)Code:int i = 2; ... for (i; i < 10; i++)
Or even more efficiently as
Code:int i = 2; ... for ( ; i < 10; i++)
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.