find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
Answer Posted / vignesh1988i
the answer is 6...since ++ as well as * gets the same
prority so the associativity will be right to left.. so it
will point to the value and then increment the value
| Is This Answer Correct ? | 23 Yes | 3 No |
Post New Answer View All Answers
What is the newline escape sequence?
Why & is used in scanf in c?
What is meant by 'bit masking'?
Can we change the value of static variable in c?
What is a structure in c language. how to initialise a structure in c?
What header files do I need in order to define the standard library functions I use?
Can you please explain the difference between malloc() and calloc() function?
What are operators in c?
Is return a keyword in c?
pierrot's divisor program using c or c++ code
What is the right type to use for boolean values in c? Is there a standard type?
program for reversing a selected line word by word when multiple lines are given without using strrev
What is the modulus operator?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Write a program on swapping (100, 50)