difference between i++* and *++i

Answer Posted / yathish m yadav

*++i
assuming i is declared as pointer
i will be first incremented to point to next location to
which it is pointing. then, the content of location to
which i is newly pointing will be assigned if any variable
is used like: a=*++i;
here since it is not assigned to any variable it will be
dicard.

i++*
if the statement is int a=i++*;
then i is incremented to point to next location of its type
then the content of that location is being copied to a
using *.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of functions are there in c?

831


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

2468


How can I avoid the abort, retry, fail messages?

913


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2448


What do header files do?

848


What is local and global variable in c?

895


What is wrong in this statement? scanf(“%d”,whatnumber);

1019


how can use subset in c program and give more example

1716


Explain the term printf() and scanf() used in c language?

862


What is the difference between ++a and a++?

983


Why do we use c for the speed of light?

852


What do mean by network ?

924


What are linked lists in c?

897


What is #include conio h?

818


Explain the difference between exit() and _exit() function?

935