Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > it is not print...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 25481 of 27670
Post > Topic >>

it is not printing the right values

by "prashant.khade1623@[EMAIL PROTECTED] " <prashant.khade1623@[EMAIL PROTECTED] > Apr 10, 2008 at 01:16 AM

main()
{

int *ptr;
int *p;
p=ptr;
int i;
ptr = malloc (10);

for (i =0;i<10;i++)
ptr[i++] = 2;

for (i =0;i<10;i++)
printf("%d\n",p[i]);
}


the output is something like this

0
4096
132617
-1075507061
4
12643904
3
100
0
2
 




 11 Posts in Topic:
it is not printing the right values
"prashant.khade1623@  2008-04-10 01:16:29 
Re: it is not printing the right values
Chris McDonald <chris@  2008-04-10 08:19:29 
Re: it is not printing the right values
WANG Cong <xiyou.wangc  2008-04-10 17:07:28 
Re: it is not printing the right values
"prashant.khade1623@  2008-04-10 02:54:41 
Re: it is not printing the right values
Lew Pitcher <lpitcher@  2008-04-10 09:51:15 
Re: it is not printing the right values
Lew Pitcher <lpitcher@  2008-04-10 09:54:55 
Re: it is not printing the right values
Richard <devr_@[EMAIL   2008-04-10 12:01:08 
Re: it is not printing the right values
Ben Bacarisse <ben.use  2008-04-10 11:36:00 
Re: it is not printing the right values
"prashant.khade1623@  2008-04-10 03:47:08 
Re: it is not printing the right values
Martin Ambuhl <mambuhl  2008-04-10 11:35:10 
Re: it is not printing the right values
Kenneth Brody <kenbrod  2008-04-10 11:51:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 21:55:40 CDT 2008.