Re: [twincling] simple C code

2009-07-27 Thread Saifi Khan
On Sat, 18 Jul 2009, Mukund Deshpande wrote: Hi uma, #include stdio.h int main(int argc, char *argv[]) { int *a; int **b; int *c; c = (int *)a; b = c; return 0; } This seems to work why? thanks, SMS On Sat, Jul 18, 2009 at 2:01 PM, uma u...@twincling.org wrote:

Re: [twincling] simple C code

2009-07-18 Thread uma
Hi Saifi, The following line should give compiler error b = (int *)a; '' operator expects operand immediately, but not typecast operator or any other expression. It could be corrected as: #include stdio.h int main(int argc, char *argv[]) { char *a; int **b; int *c; c = (int *)a; b = c;

Re: [twincling] simple C code

2009-07-18 Thread Mukund Deshpande
Hi uma, #include stdio.h int main(int argc, char *argv[]) { int *a; int **b; int *c; c = (int *)a; b = c; return 0; } This seems to work why? thanks, SMS On Sat, Jul 18, 2009 at 2:01 PM, uma u...@twincling.org wrote: Hi Saifi, The following line should give compiler error b = (int