[algogeeks] confusion

2011-08-29 Thread Nitin
Please specify the difference between Array of pointer and Pointer to
array???it's getting very messy

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2011-08-29 Thread Vijay Khandar
Array of pointers is= *a=A[10];

Pointers to array means= *A[10];
 is this correct?

On Mon, Aug 29, 2011 at 1:14 PM, Nitin coolguyinat...@gmail.com wrote:

 Please specify the difference between Array of pointer and Pointer to
 array???it's getting very messy

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2011-08-29 Thread Akshat Sapra
Array of Pointers : By Array of Pointers we mean that there is an array that
contains the pointers at different index which points to some value in the
memory.

Example:-

int *arr[10]
In this array arr[0],arr[1]arr[9] is a pointer that points to some value
in a memory.

Pointer to array :  By Pointer to array we means that there is a pointer
that is defined to point to some index in an array.

Example:-

There is some array arr and we define a pointer a;

int *a = arr;
then this points to value arr[0];
and if int *a = arr+9;
then  this points to value arr[9];



-- 


Akshat Sapra
Under Graduation(B.Tech)
IIIT-Allahabad(Amethi Campus)
--
sapraaks...@gmail.com
akshatsapr...@gmail.com
rit2009...@iiita.ac.in
sapraaks...@facebook.com

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2011-08-29 Thread UTKARSH SRIVASTAV
int *p[10]=array of pointers meaning they can can point to 10 integer type
locations
int (*p)[10] =pointer of array which can point to an array of size 10


*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] confusion

2010-07-29 Thread tarak mehta
#includestdio.h
int main()
{
int i=1;
printf(%d\n,printf(%d,printf(%d,i))); return 0;
}


output is 111..i was expecting it to be 11..plz explain??

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2010-07-29 Thread Shafi Ahmad
printf(%d\n,printf(%d,printf(%d,i)));
   - 1 -- This will print 1
and printf returns 1
 2 -- This will print the
return value of printf 1 and it will return 1.
--- 3 --- This will print the
return value of printf 2 and it will again return 1 but there is no
printf to print it.
Hope I make it clear to you.

-Shafi

On Thu, Jul 29, 2010 at 2:16 PM, tarak mehta tarakmeht...@gmail.com wrote:

 #includestdio.h
 int main()
 {
 int i=1;
 printf(%d\n,printf(%d,printf(%d,i))); return 0;
 }


 output is 111..i was expecting it to be 11..plz explain??

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2010-07-29 Thread Prashant Kulkarni
every printf statement wll return how many number of parameter/variable
print r printed so 2nd nested wll print number 1 n remaing two printf
statement wll print number of parameters are printed so total three 1's
.:)

-- Prashant Kulkarni
|| Lokaha Samastaha Sukhino Bhavanthu ||
|| Sarve Jana Sukhino Bhavanthu ||



On Thu, Jul 29, 2010 at 2:16 PM, tarak mehta tarakmeht...@gmail.com wrote:

 #includestdio.h
 int main()
 {
 int i=1;
 printf(%d\n,printf(%d,printf(%d,i))); return 0;
 }


 output is 111..i was expecting it to be 11..plz explain??

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2010-07-29 Thread umesh kewat
Hi tarak,
output is right, because every printf print 1 so there is 3 printf call...so
111 is right

On Thu, Jul 29, 2010 at 2:16 PM, tarak mehta tarakmeht...@gmail.com wrote:

 #includestdio.h
 int main()
 {
 int i=1;
 printf(%d\n,printf(%d,printf(%d,i))); return 0;
 }


 output is 111..i was expecting it to be 11..plz explain??

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Thanks  Regards

Umesh kewat

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2010-07-29 Thread harit agarwal
printf returns the number of character it prints so output is ok
it is 111
see this o/p you will understand

#includestdio.hint main(){int
i=1;printf(%d\n,printf(%d\n,printf(%d,i))); return 0;}

http://codepad.org/gLGMDdoU

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] confusion

2010-07-29 Thread Shafi Ahmad
 printf(%d\n,printf(%d\n,printf(%d,i))); return 0;
  12--3
remove the new line '\n' character from 2nd printf it will print 111 because
printf function returns number of character displayed. New line is
considered as one chracter.
In original questions 2nd printf does not have \n chracter.
-Shafi

On Thu, Jul 29, 2010 at 2:29 PM, harit agarwal agarwalha...@gmail.comwrote:

 printf returns the number of character it prints so output is ok
 it is 111
 see this o/p you will understand

 #includestdio.hint main(){int i=1;
 printf(%d\n,printf(%d\n,printf(%d,i))); return 0;}

 http://codepad.org/gLGMDdoU

   --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards,
Shafi Ahmad

The difficult we do immediately, the impossible takes a little longerUS
Army

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.