find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
Answer Posted / manishsoni
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
it allocate as this
____ _____
x| |value p | | store &x
| 5 | | 100 |
|____| |_____|
____ _____
|100 |&x | 200 |&p p is pointer //at statement ++*p
|____| |_____|
^ ^
|________________|
and jumpt at 5 bcoz it is prefix for firstof all 5 is
increase then print
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Write a code to generate divisors of an integer?
Explain how does free() know explain how much memory to release?
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is the total generic pointer type?
Explain what is a static function?
What is call by reference in functions?
please send me the code for multiplying sparse matrix using c
what is bit rate & baud rate? plz give wave forms
What is context in c?
how can use subset in c program and give more example
Combinations of fibanocci prime series
What is the purpose of & in scanf?
What are the different types of objects used in c?
How do we declare variables in c?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above