difference between i++* and *++i

Answer Posted / vignesh1988i

i++* wont work .... as for as i know.... it's meaningless

comin to *++i, i is a pointer holding an address so here ++
and * holds the same priority so we ll go for associativity
of these operators. it's RIGHT to LEFT.

so , address in 'i' will get incremented and then if that
address points to some value means it will print that value
or else it will have garbage value



thank u

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are terms in math?

583


How old is c programming language?

571


In which layer of the network datastructure format change is done

1428


What is string function c?

561


What is the scope of global variable in c?

551






How arrays can be passed to a user defined function

570


What is 1f in c?

1831


What is difference between array and structure in c?

573


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

910


Here is a neat trick for checking whether two strings are equal

559


Write a program to know whether the input number is an armstrong number.

662


What are the loops in c?

589


What is meant by 'bit masking'?

880


write a c program to calculate sum of digits till it reduces to a single digit using recursion

2716


Why c is called a middle level language?

634