IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C# Programming Java Programming
Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Pointers - Discussion

@ : Home > C Programming > Pointers > General Questions - Discussion

Read more:

"Life is like riding a bicycle. To keep your balance you must keep moving."
- Albert Einstein
Prachi Deshmukh said: (Wed, Jun 9, 2010 02:07:17 AM)    
 
How the value of D is 11?

Sundar said: (Mon, Jun 21, 2010 01:03:25 AM)    
 
Hi Prachi Deshmukh,

c = ++*ptra; --> This statement increments the value of 'a' and assings it to 'c'. Therefore 'a' and 'c' are equal.


d = (*ptrb)++; --> This statement assigns the value of 'b' to 'd',
then increases the value of 'b'. So, here 'd' is less than 'b'.

Pragatheeswaran said: (Mon, Jun 21, 2010 01:03:30 AM)    
 
If we use with directly in printf() ++*ptr is should equal to ++*(ptr).

Ex:

printf("%d", ++*ptr) is equal to printf("%d", ++*(ptr))

but not equal to printf("%d",(*ptr)++)

Muhammad Alshad said: (Thu, Jul 22, 2010 09:27:02 PM)    
 
thanks sundar and pragtheesh

Chandana said: (Thu, Jul 29, 2010 10:12:46 AM)    
 
thanks sundar

Padma said: (Mon, Aug 16, 2010 01:41:38 AM)    
 
thanks sundar

Write your comments here:
Name *:     Email:


© 2008-2011 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Advertise     Contact us: info@indiabix.com     Follow us on twitter!